Repository navigation
[MOD-17464] Document mistaken PR cleanup workflow - #10824
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d56b104fa4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 061dbcc7aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6df6155fc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86e24bcb6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fea7a89c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 5. If force-push cleanup is approved and the head is disposable, force-push the head branch | ||
| to a harmless commit first. Usually this is the base branch tip. |
There was a problem hiding this comment.
Check closed state before rewriting the head
For cleanup of an already-closed PR, this step rewrites the head before step 9 considers that the PR's stale diff may not update after a normal force-push. The workflow can therefore discard the approved disposable branch state and only afterward discover that the unwanted diff is still visible and requires administrator or GitHub Support intervention. Inspect the PR state before any mutation and route already-closed PRs directly to the stale-diff handling path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@oshadmi Maybe it's better to check the PR state as part of the first step.
| If unsure, use ordinary closure or ask before cleanup. Cleanup is exceptional and requires a | ||
| specific reason or approval. |
There was a problem hiding this comment.
Require both approval and a qualifying cleanup reason
This summary says cleanup requires a reason or approval, contradicting lines 17–26 and step 1, which require direct current-user approval in addition to a qualifying reason. For example, if the user asks only to close a wrong-repository PR, an agent could treat the known reason as sufficient authorization to rewrite or delete its branch. Fresh evidence in this revision is this newly contradictory disjunction despite the surrounding approval checks; state the conjunction consistently so ordinary closure cannot authorize destructive cleanup.
Useful? React with 👍 / 👎.
|



Describe the changes in the pull request
A clear and concise description of what the PR is solving, including:
close-prskill for PR closure/cleanup and reference it fromAGENTS.md.Which additional issues this PR fixes
Main objects this PR modified
.skills/close-pr/SKILL.md.skills/close-pr/agents/openai.yaml.skills/open-pr/SKILL.mdAGENTS.mdMark if applicable
Release Notes
If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.