Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

"Delete PR staging and head branches" workflow fails for PR merges by 'advisory-database' bot

Open
#5,167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions
Domain
ci-cd

Research direction

Start by reading .github/workflows/delete_staging_and_head_branches.yaml and inspecting the example run for #5164. Trace how merges by the advisory-database bot interact with branch deletion, while preserving cleanup for pull requests closed by the author and keeping genuine deletion errors visible. Done means bot-merged pull requests no longer show a failed check for an already-deleted branch.

Written by the indexing model from the issue text.

Description

The "Delete PR staging and head branches" (.github/workflows/delete_staging_and_head_branches.yaml) workflow currently fails when a PR was merged by the 'advisory-database' bot, because that bot is already deleting the source branch itself.
This might be a bit irritating when viewing the "Checks" tab of a pull request, or when you see the ❌ indicator for the commit of the pull request.

See for example https://github.com/github/advisory-database/actions/runs/12750406199 for #5164.

Maybe the solution could be that the 'advisory-database' bot is changed to not delete the branch itself?
Removing the "Delete PR staging and head branches" workflow is probably not an option because it is needed for pull requests closed by the author (and not merged), and adding || true or similar in the workflow might hide actual errors when deleting branches.

Dominant language
No language data
Stars
2.5k
Forks
772
Avg merge
3d 15h
Merged PRs (30d)
46

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/advisory-database

All issues in github/advisory-database

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.