diff --git a/.github/workflows/basic-qa.yml b/.github/workflows/basic-qa.yml index 9952672..05e11cd 100644 --- a/.github/workflows/basic-qa.yml +++ b/.github/workflows/basic-qa.yml @@ -52,9 +52,9 @@ jobs: fail: true spellcheck: - name: Spellcheck # Config file: .cspell.yml + name: Spellcheck runs-on: ubuntu-latest steps: diff --git a/.github/workflows/label-merge-conflicts.yml b/.github/workflows/label-merge-conflicts.yml index c00ff5f..d67e3cf 100644 --- a/.github/workflows/label-merge-conflicts.yml +++ b/.github/workflows/label-merge-conflicts.yml @@ -14,10 +14,10 @@ on: jobs: check-prs: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' name: Check PRs for merge conflicts + runs-on: ubuntu-latest steps: - name: Check PRs for merge conflicts diff --git a/.github/workflows/label-new-prs.yml b/.github/workflows/label-new-prs.yml index e82a2eb..f625bed 100644 --- a/.github/workflows/label-new-prs.yml +++ b/.github/workflows/label-new-prs.yml @@ -18,10 +18,10 @@ on: jobs: label-new-prs: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' && github.event_name == 'pull_request_target' name: Add labels to new PRs + runs-on: ubuntu-latest steps: - name: Label new PRs @@ -30,10 +30,10 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" validate-labeler-worflow: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' && github.event_name == 'pull_request' && github.event.pull_request.merged == false name: Validate changes to Labeler logic + runs-on: ubuntu-latest steps: # Checkout is needed to use the `use_local_config` option. diff --git a/.github/workflows/label-remove-outdated.yml b/.github/workflows/label-remove-outdated.yml index 74fe648..4558532 100644 --- a/.github/workflows/label-remove-outdated.yml +++ b/.github/workflows/label-remove-outdated.yml @@ -12,10 +12,10 @@ on: jobs: on-issue-close: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' && github.event.issue.state == 'closed' name: Clean up labels on issue close + runs-on: ubuntu-latest steps: - uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0 @@ -29,10 +29,10 @@ jobs: Status: triage on-pr-review-request: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' && github.event.action == 'review_requested' name: "Clean up labels on PR (re-)review request" + runs-on: ubuntu-latest steps: - uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0 @@ -42,10 +42,10 @@ jobs: Status: awaiting feedback on-pr-merge: - runs-on: ubuntu-latest if: github.repository_owner == 'PHPCSStandards' && github.event.pull_request.merged == true name: Clean up labels on PR merge + runs-on: ubuntu-latest steps: - uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0 @@ -61,11 +61,11 @@ jobs: Status: wait for PHPCS 4.0.0 release on-pr-close: - runs-on: ubuntu-latest # yamllint disable-line rule:line-length if: github.repository_owner == 'PHPCSStandards' && github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == false name: Clean up labels on PR close + runs-on: ubuntu-latest steps: - uses: mondeja/remove-labels-gh-action@b7118e4ba5dca74acf1059b3cb7660378ff9ab1a # v2.0.0 diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index f376ce9..18e79b9 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -19,13 +19,12 @@ jobs: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' - runs-on: ubuntu-latest - permissions: # Needed for the PR comment. pull-requests: write name: Comment on a pull request + runs-on: ubuntu-latest steps: - name: Download PR info artifact diff --git a/.github/workflows/publish-wiki.yml b/.github/workflows/publish-wiki.yml index 420781c..47f3014 100644 --- a/.github/workflows/publish-wiki.yml +++ b/.github/workflows/publish-wiki.yml @@ -32,15 +32,15 @@ concurrency: jobs: publish-wiki: - name: "Publish Wiki" - if: github.repository == 'PHPCSStandards/PHP_CodeSniffer-documentation' - - runs-on: ubuntu-latest - permissions: # Needed for the commit to the wiki. contents: write + if: github.repository == 'PHPCSStandards/PHP_CodeSniffer-documentation' + + name: "Publish Wiki" + runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -159,6 +159,10 @@ jobs: # ################################################################################ # Dry-run/PRs: save PR info for use in Pull Request Comment workflow. + # + # Note: posting the comment needs to be done via a separate workflow to allow for + # the commenting to work on PRs coming from forks. + # See issue #42 and PR #43 for full details. # ################################################################################ - name: Create temporary directory