Skip to content

Implement PR supersedence for font data updater#55

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/implement-pr-supersedence
Draft

Implement PR supersedence for font data updater#55
Copilot wants to merge 5 commits intomainfrom
copilot/implement-pr-supersedence

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

The font data updater creates a new PR on each run but leaves previous update PRs open, cluttering the repository. This implements automatic closure of superseded PRs mirroring Dependabot's behavior.

Changes

  • PR supersedence logic: Added section in Update-FontsData.ps1 that queries open PRs with gh pr list, filters out the current branch, and closes superseded PRs with contextual comments
  • Consistency constant: Introduced $AUTO_UPDATE_PR_PREFIX to ensure PR creation and search use identical title patterns
  • Documentation: Created scripts/README.md documenting updater behavior and supersedence workflow

Implementation

# Search for existing open update PRs
$openPRsJson = Run gh pr list --state open --json number,title,headRefName --search "$AUTO_UPDATE_PR_PREFIX in:title"

# Close each superseded PR (excluding current branch)
foreach ($pr in $openPRs) {
    if ($pr.headRefName -eq $targetBranch) { continue }
    Run gh pr close $($pr.number) --comment $supersedenceMessage
}

The logic runs before PR creation/update, ensuring the repository maintains only the latest update PR at any time.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.powershellgallery.com
    • Triggering command: /usr/bin/pwsh pwsh -Command Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser -SkipPublisherCheck (dns block)
    • Triggering command: /usr/bin/pwsh pwsh -Command Install-PSResource -Repository PSGallery -TrustRepository -Name PSScriptAnalyzer (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>🌞 [Other]: Implement PR Supersedence for Font Data Updater</issue_title>
<issue_description>### Description

Description

The font data updater should automatically close older update pull requests when it opens a new PR, mirroring dependabot's supersedence behavior. When a new update PR is created, any previous open update PRs should be detected and closed. Additionally, when an update PR is merged and the font data file is updated, any previous related PRs (that become outdated due to the merge) should also be closed.

Requested functionality:

  • Detect existing open font data update PRs when a new update PR is opened.
  • Automatically close superseded PRs with a comment indicating they were replaced by a newer update.
  • When an update PR is merged and the font data file is updated, ensure all previous open PRs for font data updates are closed if they are obsolete.
  • Follow the behavior similar to dependabot's PR lifecycle management.

Why:
This will keep the repository tidy, prevent confusion from redundant update PRs, and streamline the review/merge process.

Optional:

  • Add a configurable message to be posted when closing superseded PRs.
  • Ensure changes are documented in the updater bot's README or docs.
    </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 8, 2026 11:04
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:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants