From 95038cd6c9b86ad2087ffbeebaf3d5e7f32ad18e Mon Sep 17 00:00:00 2001 From: Mikey Lombardi Date: Wed, 28 Oct 2026 13:12:10 -0500 Subject: [PATCH 1/2] (GHA) Remove legacy workflows and pin SHAs This change removes legacy workflows that are no longer supported: - `quality.pr` - `quality.issue` - `targeting-repo-files` - `targeting-valid-branch` It pins the actions for the remaining workflows to a SHA representing the last known good commit for each action. --- .github/workflows/checklist.yml | 2 +- .github/workflows/expectations.yml | 2 +- .github/workflows/quality.issue.yml | 64 -------------------- .github/workflows/quality.pr.yml | 38 ------------ .github/workflows/stale-content.yml | 2 +- .github/workflows/targeting-repo-files.yml | 39 ------------ .github/workflows/targeting-valid-branch.yml | 23 ------- 7 files changed, 3 insertions(+), 167 deletions(-) delete mode 100644 .github/workflows/quality.issue.yml delete mode 100644 .github/workflows/quality.pr.yml delete mode 100644 .github/workflows/targeting-repo-files.yml delete mode 100644 .github/workflows/targeting-valid-branch.yml diff --git a/.github/workflows/checklist.yml b/.github/workflows/checklist.yml index 10d7635a..8002c6bf 100644 --- a/.github/workflows/checklist.yml +++ b/.github/workflows/checklist.yml @@ -24,4 +24,4 @@ jobs: steps: - name: Verify Checklist id: verify_checklist - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/verification/checklist/v1@main + uses: MicrosoftDocs/PowerShell-Docs/.github/actions/verification/checklist/v1@a3de8f22552170e70852470d46cd52cd9ca471ec diff --git a/.github/workflows/expectations.yml b/.github/workflows/expectations.yml index 826a6638..401776d3 100644 --- a/.github/workflows/expectations.yml +++ b/.github/workflows/expectations.yml @@ -22,7 +22,7 @@ jobs: id: checkout_repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Comment on Community PRs - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/commenting/expectations/v1@main + uses: MicrosoftDocs/PowerShell-Docs/.github/actions/commenting/expectations/v1@a3de8f22552170e70852470d46cd52cd9ca471ecs with: message_path: .github/messages/expectations.md token: ${{ github.token }} diff --git a/.github/workflows/quality.issue.yml b/.github/workflows/quality.issue.yml deleted file mode 100644 index 7bfc83d8..00000000 --- a/.github/workflows/quality.issue.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: "Quality Contribution Issues" -on: - issues: - types: - - opened - -jobs: - # Check if the issue is for quality contributions; all other jobs depend on this one. - quality: - name: Is Quality Contribution? - runs-on: ubuntu-latest - outputs: - check: ${{ steps.is-quality.outputs.match != '' }} - steps: - - uses: actions-ecosystem/action-regex-match@9e6c4fb3d5e898f505be7a1fb6e7b0a278f6665b # v2.0.2 - id: is-quality - with: - text: ${{ github.event.issue.body }} - regex: "Quality: Foo" - flags: gm - - assign: - name: Assign to author - needs: quality - if: needs.quality.outputs.check == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-add-assignees@a5b84af721c4a621eb9c7a4a95ec20a90d0b88e9 # v1.0.1 - with: - github_token: ${{ secrets.github_token }} - assignees: ${{ github.event.issue.user.login }} - - label: - name: Add quality labels - needs: quality - if: needs.quality.outputs.check == 'true' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - regex: Aliases - label: quality-aliases - - regex: Formatting code samples - label: quality-format-code-samples - - regex: Formatting command syntax - label: quality-format-command-syntax - - regex: Link references - label: quality-link-references - - regex: Markdown linting - label: quality-markdownlint - - regex: Spelling - label: quality-spelling - steps: - - uses: actions-ecosystem/action-regex-match@9e6c4fb3d5e898f505be7a1fb6e7b0a278f6665b # v2.0.2 - id: matcher - with: - text: ${{ github.event.issue.body }} - regex: '^### Quality Areas\s*^.*${{ matrix.regex }}.*$' - flags: gm - - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3 - if: steps.matcher.outputs.match != '' - with: - labels: ${{ matrix.label }} diff --git a/.github/workflows/quality.pr.yml b/.github/workflows/quality.pr.yml deleted file mode 100644 index 79662e67..00000000 --- a/.github/workflows/quality.pr.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "Quality Contributions" -on: - pull_request_target: - branches: - - main - types: - - opened - - reopened - - edited - -defaults: - run: - shell: pwsh - -jobs: - # Check if the PR is for quality contributions; all other jobs depend on this one. - check: - name: Is Quality Contribution? - outputs: - title: ${{ steps.title.outputs.check == 'true' }} - runs-on: ubuntu-latest - steps: - - id: title - run: | - $Check = "${{ contains(github.event.pull_request.title, 'Quality:') }}" - "Check: $Check" - "check=$Check" >> $env:GITHUB_OUTPUT - - project: - name: Add pull request to project - needs: check - if: | - needs.check.outputs.title == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3 - with: - labels: project-quality diff --git a/.github/workflows/stale-content.yml b/.github/workflows/stale-content.yml index b2e35d0c..bdf4d3db 100644 --- a/.github/workflows/stale-content.yml +++ b/.github/workflows/stale-content.yml @@ -24,7 +24,7 @@ jobs: id: checkout_repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Write Report - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/reporting/stale-content/v1@main + uses: MicrosoftDocs/PowerShell-Docs/.github/actions/reporting/stale-content/v1@a3de8f22552170e70852470d46cd52cd9ca471ec with: relative_folder_path: | reference/docs-conceptual diff --git a/.github/workflows/targeting-repo-files.yml b/.github/workflows/targeting-repo-files.yml deleted file mode 100644 index 63a00b6d..00000000 --- a/.github/workflows/targeting-repo-files.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow verifies that an author submitting a pull request to the main -# branch to modify repository files is authorized to do so; only users with -# maintainer or admin rights may modify the actions or the workflow definitions. -name: Authorization -on: - pull_request_target: - branches: - - main - paths: - - "*.yml" - - .github/** - - .openpublishing* - - LICENSE* - - reference/docfx.json - - reference/mapping/** - - ThirdPartyNotices -permissions: - contents: read -jobs: - Test: - name: Check Repo File Permissions - runs-on: windows-latest - defaults: - run: - shell: pwsh - steps: - - name: Authorized to Modify Repo Files? - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/verification/authorization/v1@main - with: - token: ${{ github.token }} - target: | - path: - *.yml - .github/** - .openpublishing* - LICENSE* - reference/docfx.json - reference/mapping/** - ThirdPartyNotices diff --git a/.github/workflows/targeting-valid-branch.yml b/.github/workflows/targeting-valid-branch.yml deleted file mode 100644 index 7486fe32..00000000 --- a/.github/workflows/targeting-valid-branch.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This workflow verifies that an author submitting a pull request to the live -# branch is authorized to do so; only users with maintainer or admin rights may -# target the live branch directly. -name: Authorization -on: - pull_request_target: - branches: - - live -permissions: - contents: read -jobs: - Test: - name: Check Branch Permissions - runs-on: windows-latest - defaults: - run: - shell: pwsh - steps: - - name: Authorized to Target Live Branch? - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/verification/authorization/v1@main - with: - token: ${{ github.token }} - authorized_accounts: learn-build-service-prod[bot] From 791eb9a0dba0c4c826d0f88283a96cf4416f748c Mon Sep 17 00:00:00 2001 From: "Mikey Lombardi (He/Him)" Date: Wed, 28 Oct 2026 13:20:47 -0500 Subject: [PATCH 2/2] Update commenting action version in expectations.yml Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/expectations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/expectations.yml b/.github/workflows/expectations.yml index 401776d3..24fcf790 100644 --- a/.github/workflows/expectations.yml +++ b/.github/workflows/expectations.yml @@ -22,7 +22,7 @@ jobs: id: checkout_repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Comment on Community PRs - uses: MicrosoftDocs/PowerShell-Docs/.github/actions/commenting/expectations/v1@a3de8f22552170e70852470d46cd52cd9ca471ecs + uses: MicrosoftDocs/PowerShell-Docs/.github/actions/commenting/expectations/v1@a3de8f22552170e70852470d46cd52cd9ca471ec with: message_path: .github/messages/expectations.md token: ${{ github.token }}