Skip to content

⚙️ [Maintenance]: Implement PR Supersedence for Font Data Updater#147

Merged
MariusStorhaug merged 17 commits intomainfrom
copilot/implement-font-data-pr-supersedence
Feb 10, 2026
Merged

⚙️ [Maintenance]: Implement PR Supersedence for Font Data Updater#147
MariusStorhaug merged 17 commits intomainfrom
copilot/implement-font-data-pr-supersedence

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

The font data updater now automatically closes older Auto-Update pull requests when a new update is created, similar to Dependabot's supersedence behavior. This keeps your repository tidy by ensuring only the most recent font data update PR remains open.

PR Supersedence Behavior

When the font data updater creates a new Auto-Update PR, it now automatically:

  1. Retrieves the newly created PR (with retry logic for API timing)
  2. Searches for any existing open Auto-Update* PRs
  3. Posts a comment on each explaining it has been superseded
  4. Closes each superseded PR

The comment posted on superseded PRs references the new PR number:

This PR has been superseded by #[NEW_PR_NUMBER] and will be closed automatically.

The font data has been updated in the newer PR. Please refer to #[NEW_PR_NUMBER] for the most current changes.

Documentation

A new scripts/README.md documents:

  • How the font data updater works
  • The PR supersedence behavior and lifecycle
  • Manual execution steps via GitHub Actions
  • Configuration options
  • Troubleshooting guidance

Copilot AI and others added 8 commits February 8, 2026 11:03
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>
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>
Copilot AI changed the title [WIP] Implement PR supersedence for font data updater Implement PR supersedence for font data updater Feb 8, 2026
Copilot AI requested a review from MariusStorhaug February 8, 2026 11:13
@MariusStorhaug
Copy link
Member

@copilot Remember to put all scripts from workflows into powershell scripts in the scripts folder and call these files from the task in the workflow.

Also, change the 'on': to on:.

Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot Remember to put all scripts from workflows into powershell scripts in the scripts folder and call these files from the task in the workflow.

Also, change the 'on': to on:.

Done! The changes have been implemented in commit a4857ab:

  1. ✅ Moved the PowerShell script from the workflow into scripts/Close-SupersededPRs.ps1
  2. ✅ Changed 'on': to on: in the workflow YAML
  3. ✅ Added checkout step to the workflow so it can access the script file
  4. ✅ Updated documentation to reference the new script structure

The workflow now calls scripts/Close-SupersededPRs.ps1 using the Script: parameter.

The Update-FontsData.ps1 script already closes superseded Auto-Update
PRs immediately after creating a new one, making the separate cleanup
workflow (triggered on PR merge) redundant.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@MariusStorhaug MariusStorhaug marked this pull request as ready for review February 10, 2026 09:49
Copilot AI review requested due to automatic review settings February 10, 2026 09:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements Dependabot-like PR supersedence for the font data updater so that when a new auto-update PR is created, older open Auto-Update* PRs are automatically commented on and closed. Adds documentation for the updater workflow and its supersedence behavior (Fixes #146).

Changes:

  • Add logic to scripts/Update-FontsData.ps1 to locate the newly created PR, find other open Auto-Update* PRs, comment on them, and close them.
  • Add scripts/README.md documenting the updater workflow, configuration, and troubleshooting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/Update-FontsData.ps1 Adds post-PR-creation logic to comment on and close superseded Auto-Update* PRs.
scripts/README.md Documents the updater script’s behavior, including PR supersedence and operational details.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Run gh pr comment $pr.number --repo 'PSModule/GoogleFonts' --body $comment

# Close the PR
Run h pr close $pr.number --repo 'PSModule/GoogleFonts'
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Typo in command invocation: Run h pr close ... calls h instead of gh, which will fail with “command not found” and abort the workflow when trying to close superseded PRs. Update it to invoke the GitHub CLI (gh pr close).

Suggested change
Run h pr close $pr.number --repo 'PSModule/GoogleFonts'
Run gh pr close $pr.number --repo 'PSModule/GoogleFonts'

Copilot uses AI. Check for mistakes.
@MariusStorhaug MariusStorhaug changed the title Implement PR supersedence for font data updater 🚀 [Feature]: Implement PR Supersedence for Font Data Updater Feb 10, 2026
@MariusStorhaug MariusStorhaug added the Minor Feature updates that are backwards compatible label Feb 10, 2026
@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@MariusStorhaug MariusStorhaug changed the title 🚀 [Feature]: Implement PR Supersedence for Font Data Updater ⚙️ [Maintenance]: Implement PR Supersedence for Font Data Updater Feb 10, 2026
@MariusStorhaug MariusStorhaug added NoRelease Do not create a release and removed Minor Feature updates that are backwards compatible labels Feb 10, 2026
@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@github-actions
Copy link
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

Path Description
src/** Module source code
README.md Documentation

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.

@MariusStorhaug MariusStorhaug merged commit 57437c4 into main Feb 10, 2026
29 checks passed
@MariusStorhaug MariusStorhaug deleted the copilot/implement-font-data-pr-supersedence branch February 10, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NoRelease Do not create a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🌞 [Other]: Implement PR Supersedence for Font Data Updater

2 participants