Skip to content

[MOD-17464] Document mistaken PR cleanup workflow - #10824

Merged
oshadmi merged 7 commits into
masterfrom
agent/publish-pr-cleanup-skill
Aug 15, 2026
Merged

oshadmi merged 7 commits into
masterfrom
agent/publish-pr-cleanup-skill

Conversation

@oshadmi

@oshadmi oshadmi commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

A clear and concise description of what the PR is solving, including:

  1. Current: The PR workflow skills do not document the cleanup order for mistaken or unwanted PRs.
  2. Change: Add a focused close-pr skill for PR closure/cleanup and reference it from AGENTS.md.
  3. Outcome: Agents check whether a PR diff should be cleaned before closing or deleting branches, and know when stale PR refs need admin or GitHub Support escalation.

Which additional issues this PR fixes

  1. MOD-17464

Main objects this PR modified

  1. .skills/close-pr/SKILL.md
  2. .skills/close-pr/agents/openai.yaml
  3. .skills/open-pr/SKILL.md
  4. AGENTS.md

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .skills/open-pr/SKILL.md Resolved
Comment thread .skills/open-pr/SKILL.md Resolved
Comment thread .skills/open-pr/SKILL.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .skills/close-pr/SKILL.md Resolved
@oshadmi
oshadmi requested a review from LukeMathWalker August 12, 2026 05:44
LukeMathWalker
LukeMathWalker previously approved these changes Aug 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .skills/close-pr/SKILL.md Resolved
@oshadmi
oshadmi requested a review from LukeMathWalker August 12, 2026 13:49
@oshadmi
oshadmi enabled auto-merge August 12, 2026 13:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .skills/close-pr/SKILL.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .skills/close-pr/SKILL.md
Comment on lines +65 to +66
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oshadmi Maybe it's better to check the PR state as part of the first step.

Comment thread .skills/close-pr/SKILL.md
Comment on lines +28 to +29
If unsure, use ordinary closure or ask before cleanup. Cleanup is exceptional and requires a
specific reason or approval.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@oshadmi
oshadmi requested a review from nafraf August 14, 2026 13:25
@sonarqubecloud

Copy link
Copy Markdown

@oshadmi
oshadmi added this pull request to the merge queue Aug 15, 2026
Merged via the queue into master with commit 2581bdd Aug 15, 2026
20 checks passed
@oshadmi
oshadmi deleted the agent/publish-pr-cleanup-skill branch August 15, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants