Skip to content

ci: add automatic PR cleanup guidance - #225

Merged
bobleesj merged 1 commit into
electronmicroscopy:mainfrom
bobleesj:aug-12-pr-cleanup-bot
Aug 13, 2026
Merged

ci: add automatic PR cleanup guidance#225
bobleesj merged 1 commit into
electronmicroscopy:mainfrom
bobleesj:aug-12-pr-cleanup-bot

Conversation

@bobleesj

Copy link
Copy Markdown
Collaborator

What problem does it solve?

Merged feature branches and worktrees can remain after a PR because repository agents lack a consistent cleanup signal. PR preflight also does not explicitly require checking the diff and PR text for unintended private information.

What should reviewer(s) do?

Review the workflow permissions and event handling. Confirm it never checks out PR code, maintains one comment with exactly three bullets, reads branch names from the PR event, updates after merge, and removes the guidance when a PR closes unmerged. Review the hidden privacy checklist addition.

Verification

  • Mocked GitHub events: open, reopen, merge, and unmerged close passed.
  • PYTHONPATH=src pytest -q tests/test_repository_pr_hygiene.py: 2 passed.
  • npm run build: passed.
  • Hosted GitHub behavior will be verified on the next PR after this workflow reaches upstream main.

This PR follows the scikit-package workflow for reproducible scientific software.

@bobleesj

Copy link
Copy Markdown
Collaborator Author

Expected behavior: after this workflow reaches upstream main, the next pull request should receive the automatic three-bullet cleanup guidance from github-actions[bot]. We will use that PR as the hosted end-to-end verification.

@bobleesj
bobleesj merged commit d417865 into electronmicroscopy:main Aug 13, 2026
1 check passed
@bobleesj
bobleesj deleted the aug-12-pr-cleanup-bot branch August 13, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant