Skip to content

fix: enable delete_branch_on_merge in settings.yml for compliance#217

Closed
don-petry wants to merge 28 commits into
mainfrom
claude/issue-164-20260419-2232
Closed

fix: enable delete_branch_on_merge in settings.yml for compliance#217
don-petry wants to merge 28 commits into
mainfrom
claude/issue-164-20260419-2232

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Summary

  • Adds delete_branch_on_merge: true under the repository: section of .github/settings.yml
  • When probot/settings runs, it will declaratively enforce automatic head-branch deletion after every PR merge
  • Resolves the weekly compliance audit finding that has been open since this issue was filed

Background

Previous PRs #184 and #200 implemented the same fix but were not merged. This PR supersedes both. The GitHub API already returns delete_branch_on_merge: true (set manually), but without it in the declarative config, probot/settings could silently reset it on any future run.

Changes

  • .github/settings.yml: Added repository.delete_branch_on_merge: true

Closes #164

Generated with Claude Code

Add `delete_branch_on_merge: true` under the `repository:` section of
.github/settings.yml so probot/settings declaratively enforces automatic
head-branch deletion after every PR merge.

Closes #164

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 19, 2026 22:35
@coderabbitai

coderabbitai Bot commented Apr 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 34 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6ff832ee-263d-4294-b515-3ab3a99bd8ca

📥 Commits

Reviewing files that changed from the base of the PR and between 1f31eeb and 4505767.

📒 Files selected for processing (1)
  • .github/settings.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-164-20260419-2232

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@don-petry

Copy link
Copy Markdown
Collaborator Author

@don-petry — This PR is ready for review and merge.

What this does: Adds delete_branch_on_merge: true to .github/settings.yml so probot/settings declaratively enforces automatic head-branch deletion. This permanently resolves the compliance finding in #164.

Note: This supersedes the two earlier open PRs (#184 and #200) that made the identical change but were not merged. Once this PR is merged, you may close those as duplicates.

This is a config-only YAML change with no code impact — CI should pass cleanly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a declarative repository setting to ensure Probot Settings enforces automatic deletion of head branches after PR merges, addressing the compliance finding in #164.

Changes:

  • Added a top-level repository: section to .github/settings.yml
  • Set repository.delete_branch_on_merge: true with an inline standards reference

@github-actions github-actions Bot requested a review from a team as a code owner May 4, 2026 20:39
@don-petry don-petry closed this May 11, 2026
@don-petry don-petry reopened this May 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

@dev-lead - please fix this PR

@github-actions

Copy link
Copy Markdown
Contributor

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved manually.

Please resolve the conflicts and push:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

@donpetry-bot

Copy link
Copy Markdown
Contributor

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: LOW
Reviewed commit: 45057679b024e2b0e6ccc0e3973c2b9a8c2c47fd
Cascade: triage → deep (triage: haiku 4.5 → deep: sonnet 4.6 + duck: o4-mini → audit: opus 4.7)

Summary

Single-line YAML config change adding delete_branch_on_merge: true to .github/settings.yml — low risk, correct, and all CI checks pass (CodeQL, SonarQube, CodeRabbit). Cannot be merged because the branch has unresolved merge conflicts with main (mergeStateStatus: DIRTY); the automated rebase also failed on 2026-05-21. Additionally, the requested team reviewer (org-leads) has not yet approved.

Findings

  • major: Branch is CONFLICTING with main and cannot be merged. Auto-rebase failed on 2026-05-21. Author must resolve conflicts manually (git fetch origin && git merge origin/main), then push.
  • minor: Team 'org-leads' has been requested for review but has not yet approved. Copilot reviewed (COMMENTED state) but no formal approval exists.
  • info: The change itself is correct: adds a repository: section with delete_branch_on_merge: true under the existing probot/settings config. This matches the org standard referenced in the inline comment and resolves the compliance finding in issue Compliance: delete_branch_on_merge #164. CI (CodeQL, SonarQube) passes with 0 new issues.
  • info: This PR supersedes fix: enable delete_branch_on_merge for compliance #184 and fix: persist delete_branch_on_merge in settings.yml #200 which made the identical change but were never merged. Once conflicts are resolved and org-leads approves, this is safe to merge immediately.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: sonnet 4.6 + duck: o4-mini → audit: opus 4.7). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Closing due to merge conflict that cannot be auto-rebased. Re-implementing from fresh main via dev-lead.

@don-petry don-petry closed this Jun 2, 2026
auto-merge was automatically disabled June 2, 2026 12:16

Pull request was closed

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.

Compliance: delete_branch_on_merge

3 participants