Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gittensory.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,11 @@ settings:
# one-shot review process, not making an ordinary close. When enabled, gittensory reopens (if needed) and
# re-closes the PR as the App -- a close the contributor cannot themselves reopen (#one-shot-reopen) --
# posts an explanation comment, applies the configured label, and records a `review_evasion` moderation
# strike (subject to moderationRules above including it). Off by default.
# reviewEvasionProtection: off # off | close. Default: off.
# strike (subject to moderationRules above including it). CLOSE BY DEFAULT as of #4011 -- "off" is an
# explicit opt-out, not the default. Note: "off" only suppresses the enforcement close -- the
# ready<->draft cycling counter keeps incrementing regardless, so re-enabling can immediately treat a
# historical off-period cycle as "repeated."
# reviewEvasionProtection: close # off | close. Default: close.
# reviewEvasionLabel: review-evasion # Label applied alongside the enforcement close. Gated on autonomy.close
# # (#label-scoping); set to explicit `null` to close without any label.
# # Default: review-evasion.
Expand Down
3 changes: 2 additions & 1 deletion apps/gittensory-ui/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9568,7 +9568,8 @@
"enum": [
"off",
"close"
]
],
"description": "Effective default is \"close\" as of #4011 -- \"off\" is an explicit opt-out, not the default. \"off\" only suppresses the enforcement close; the ready<->draft cycling counter keeps incrementing regardless, so re-enabling can immediately treat a historical off-period cycle as \"repeated.\""
},
"reviewEvasionLabel": {
"type": "string",
Expand Down
7 changes: 5 additions & 2 deletions config/examples/gittensory.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,11 @@ settings:
# one-shot review process, not making an ordinary close. When enabled, gittensory reopens (if needed) and
# re-closes the PR as the App -- a close the contributor cannot themselves reopen (#one-shot-reopen) --
# posts an explanation comment, applies the configured label, and records a `review_evasion` moderation
# strike (subject to moderationRules above including it). Off by default.
# reviewEvasionProtection: off # off | close. Default: off.
# strike (subject to moderationRules above including it). CLOSE BY DEFAULT as of #4011 -- "off" is an
# explicit opt-out, not the default. Note: "off" only suppresses the enforcement close -- the
# ready<->draft cycling counter keeps incrementing regardless, so re-enabling can immediately treat a
# historical off-period cycle as "repeated."
# reviewEvasionProtection: close # off | close. Default: close.
# reviewEvasionLabel: review-evasion # Label applied alongside the enforcement close. Gated on autonomy.close
# # (#label-scoping); set to explicit `null` to close without any label.
# # Default: review-evasion.
Expand Down
7 changes: 6 additions & 1 deletion src/openapi/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,12 @@ export const RepositorySettingsSchema = z
moderationWarningLabel: z.string().optional(),
moderationBannedLabel: z.string().optional(),
skipAutomationBotAuthors: z.enum(["inherit", "off", "enabled"]).optional(),
reviewEvasionProtection: z.enum(["off", "close"]).optional(),
reviewEvasionProtection: z
.enum(["off", "close"])
.optional()
.describe(
"Effective default is \"close\" as of #4011 -- \"off\" is an explicit opt-out, not the default. \"off\" only suppresses the enforcement close; the ready<->draft cycling counter keeps incrementing regardless, so re-enabling can immediately treat a historical off-period cycle as \"repeated.\"",
),
reviewEvasionLabel: z.string().nullable().optional(),
reviewEvasionComment: z.boolean().optional(),
mergeTrainMode: z.enum(["off", "audit", "enforce"]).optional(),
Expand Down
11 changes: 8 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1131,9 +1131,14 @@ export type RepositorySettings = {
skipAutomationBotAuthors?: "inherit" | "off" | "enabled" | undefined;
/** Review-evasion protection (#review-evasion-protection): a contributor closing or converting their OWN
* PR to draft while gittensory has an ACTIVE review pass running against it is dodging the one-shot
* review process. `"off"` (the default) disables detection entirely; `"close"` reopens (if needed) and
* re-closes as the App -- a close the contributor cannot themselves reopen (#one-shot-reopen) -- applies
* the configured label/comment, and records a `review_evasion` moderation strike. */
* review process. The effective default is `"close"` as of #4011 (see `normalizeReviewEvasionProtection`
* in `db/repositories.ts`) -- `"off"` is now an explicit opt-out, not the default. `"close"` reopens (if
* needed) and re-closes as the App -- a close the contributor cannot themselves reopen (#one-shot-reopen)
* -- applies the configured label/comment, and records a `review_evasion` moderation strike. Note:
* `"off"` only suppresses this ENFORCEMENT -- the ready&harr;draft cycling COUNTER (`processors.ts`'s
* `converted_to_draft` handler, `bumpPullRequestDraftConversionCount`) keeps incrementing regardless, so a
* repo re-enabling `"close"` (or removing an `"off"` override, which now also resolves to `"close"`) can
* immediately treat a historical off-period cycle as "repeated" on the very next legitimate conversion. */
reviewEvasionProtection?: "off" | "close" | undefined;
/** Merge-train FIFO gate (#selfhost-merge-train): without this, a PR merges the instant its OWN gate
* clears, with zero awareness of an older sibling PR still open in the same repo -- proven live to cause
Expand Down
Loading