⚙️ [Maintenance]: Implement PR supersedence for font data updater#55
Conversation
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
There was a problem hiding this comment.
Pull request overview
This PR implements automatic PR supersedence for the font data updater, mirroring Dependabot's behavior. When a new Auto-Update PR is created, the script now automatically closes any existing open Auto-Update PRs with an explanatory comment, deletes their branches, and ensures only the most recent update PR remains open. A repository variable $repoName sourced from $env:GITHUB_REPOSITORY is used for GitHub CLI calls.
Changes:
- Added PR supersedence logic that closes older Auto-Update PRs after creating a new one
- Introduced
$repoNamevariable for consistent repository targeting in GitHub CLI commands - Added comprehensive documentation in
scripts/README.mdexplaining the updater's features, workflow, and PR lifecycle management
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/Update-FontsData.ps1 | Added $repoName variable and implemented PR supersedence logic with retry mechanism, branch cleanup, and explanatory comments for closed PRs |
| scripts/README.md | New documentation file describing the updater's features, PR lifecycle management, manual execution, and troubleshooting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
e9f40e3
into
main
The font data updater script now automatically manages its own pull request lifecycle by closing older update PRs when a new one is created. This mirrors Dependabot's supersedence behavior and keeps the repository tidy without requiring manual cleanup.
PR supersedence logic
After creating a new
Auto-UpdatePR, the script searches for any existing open PRs with titles matchingAuto-Update*. Each superseded PR receives an explanatory comment, is automatically closed, and its branch is deleted. Retry logic handles eventual consistency when retrieving the newly created PR.The supersedence flow:
Auto-UpdatePR is created as beforeAuto-UpdatePRs (excluding the new one)Repository variable for repo name
A
$repoNamevariable sourced from$env:GITHUB_REPOSITORYis now used consistently for allghCLI calls, ensuring correct repository targeting.Documentation
A new
scripts/README.mddocuments the updater's features, PR lifecycle management, manual execution instructions, and troubleshooting guidance.