Skip to content

Commit

Permalink
delete expired branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sqin2019 committed Jul 31, 2023
1 parent 48b8f87 commit adcaaec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/expire.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ jobs:
issue_number: pull['number'],
body: `**\`Access on Demand\`** - request closed due to inactivity for at least ${{ inputs.expiry_hours }} hours`,
});
// Delete branch.
await github.rest.git.deleteRef({
owner: repoOwner,
repo: repoName,
ref: pull['head']['ref'],
});
} else {
core.info(`Skipping #${pull['number']} (${pull['title']}) - not an AOD request`);
}
Expand Down

0 comments on commit adcaaec

Please sign in to comment.