Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Aligns GitHub Actions workflows with security best practices by implementing explicit least-privilege permissions and cleaning up non-standard formatting.

Changes

Permissions added to all workflows (9 files):

  • Caller workflows: contents: read for testing/quality, contents: write + pull-requests: write for readme regeneration, full triage permissions for issue workflows
  • Reusable workflows: matching permissions scoped to their operations

Removed separator comments: Cleaned #---- decorative separators from job definitions

Step outputs: Verified existing implementation already follows best practices (GITHUB_OUTPUT for cross-job, GITHUB_ENV for intra-job state)

Example

# Before
on:
  pull_request:

jobs:
  code-quality: #-----------------------------------------------------------------------
    uses: wp-cli/.github/.github/workflows/reusable-code-quality.yml@main

# After
on:
  pull_request:

permissions:
  contents: read

jobs:
  code-quality:
    uses: wp-cli/.github/.github/workflows/reusable-code-quality.yml@main

Modified: code-quality.yml, testing.yml, regenerate-readme.yml, issue-triage.yml, welcome-new-contributors.yml, sync-workflows.yml, and their reusable counterparts.

Original prompt

This section details on the original issue you should resolve

<issue_title>Follow GitHub Actions best practices</issue_title>
<issue_description>Some pointers in #53.

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 changed the title [WIP] Update GitHub Actions to follow best practices Add explicit permissions and remove decorator comments from workflows Jan 20, 2026
Copilot AI requested a review from swissspidy January 20, 2026 12:46
@swissspidy

This comment was marked as resolved.

@gemini-code-assist

This comment was marked as resolved.

This comment was marked as resolved.

@swissspidy swissspidy marked this pull request as ready for review January 20, 2026 13:07
@swissspidy swissspidy requested a review from a team as a code owner January 20, 2026 13:07
@swissspidy swissspidy merged commit abf8853 into main Jan 20, 2026
10 checks passed
@swissspidy swissspidy deleted the copilot/follow-github-actions-best-practices branch January 20, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scope:meta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow GitHub Actions best practices

3 participants