-
Notifications
You must be signed in to change notification settings - Fork 12
Delete copilot/* branches in E2E test workflow
#19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
copilot/* branches in E2E test workflow
…ariable for testing repo Co-authored-by: smockle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds automatic deletion of PR branches during E2E test cleanup to prevent accumulation of defunct copilot/* branches. The changes introduce branch deletion logic that extracts the branch name from each PR and removes it after closing the PR.
- Adds
TESTING_REPOSITORYenvironment variable for centralized repository configuration - Implements branch extraction and deletion logic in the cleanup workflow
- Updates repository reference to use the new environment variable
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: smockle <[email protected]>
gh pr close(closer to where it's used)|| trueinside$()for proper error handlingTESTING_REPOSITORYenvironment variable to avoid hardcodinggh apiinstead ofgit pushfor consistent authentication contextThe implementation:
gh pr view "$URL" --json headRefName -q .headRefName || truegh api -X DELETE "repos/${{ env.TESTING_REPOSITORY }}/git/refs/heads/$branch"|| trueinside command substitutionTESTING_REPOSITORYenvironment variable for consistencygh apifor branch deletion to maintain consistent authentication context with otherghCLI commandsNote: Similar changes will need to be applied to v1 and v2 branches separately after this PR is merged.
Original prompt
Fixes github/continuous-ai-for-accessibility#76
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Footnotes
And https://github.com/github/accessibility-scanner/pull/7/files#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88 and https://github.com/github/accessibility-scanner/pull/8/files#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88</issue_description> ↩