From 5c104d02e26d803ee8abbba727ba36a14a12acb2 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 16 Jul 2026 13:39:33 -0500 Subject: [PATCH] Update automated update PR workflows and filter release notes --- .github/workflows/auto-merge-docs.yaml | 4 ++-- .github/workflows/pre-release.yaml | 17 ++++++++++++++++- .github/workflows/sponsors.yaml | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-merge-docs.yaml b/.github/workflows/auto-merge-docs.yaml index f0a6333a..defc7c66 100644 --- a/.github/workflows/auto-merge-docs.yaml +++ b/.github/workflows/auto-merge-docs.yaml @@ -1,4 +1,4 @@ -name: Auto-merge Docs PRs +name: Auto-merge Automated Update PRs on: pull_request: @@ -8,7 +8,7 @@ on: jobs: auto-merge: - if: github.event.pull_request.head.ref == 'docs-update' && (github.event.pull_request.user.login == 'ChrisTitusTech' || github.event.pull_request.user.login == 'github-actions[bot]') + if: (github.event.pull_request.head.ref == 'docs-update' || github.event.pull_request.head.ref == 'sponsors-update') && (github.event.pull_request.user.login == 'ChrisTitusTech' || github.event.pull_request.user.login == 'github-actions[bot]') runs-on: ubuntu-latest permissions: pull-requests: write diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 01f0b2e4..4757555b 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -109,6 +109,21 @@ jobs: config-name: release-drafter.yml version: ${{ env.VERSION }} + - name: Remove Automated Updates from Release Notes + id: filter_notes + shell: pwsh + env: + RELEASE_NOTES: ${{ steps.generate_notes.outputs.body }} + run: | + $filteredNotes = ($env:RELEASE_NOTES -split '\r?\n' | Where-Object { + $_ -notmatch '(?i)Update (Generated Dev Docs|Sponsors)' + }) -join "`n" + + $delimiter = [guid]::NewGuid().ToString() + "body<<$delimiter" >> $env:GITHUB_OUTPUT + $filteredNotes >> $env:GITHUB_OUTPUT + $delimiter >> $env:GITHUB_OUTPUT + - name: Create and Upload Release id: create_release uses: softprops/action-gh-release@v3 @@ -116,7 +131,7 @@ jobs: tag_name: ${{ env.VERSION }} name: Pre-Release ${{ env.VERSION }} body: | - ${{ steps.generate_notes.outputs.body }} + ${{ steps.filter_notes.outputs.body }} ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1) append_body: false diff --git a/.github/workflows/sponsors.yaml b/.github/workflows/sponsors.yaml index 671d3dc7..c75c7cdb 100644 --- a/.github/workflows/sponsors.yaml +++ b/.github/workflows/sponsors.yaml @@ -26,7 +26,7 @@ jobs: id: cpr uses: peter-evans/create-pull-request@v8 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.AUTO_MERGE }} commit-message: 'Update sponsors in README' title: 'chore: Update Sponsors README' body: 'Automated update of sponsors section'