Skip to content

Conversation

@FidelusAleksander
Copy link
Contributor

Changes

Built in secrets.GITHUB_TOKEN does not have permissions to commit to .github/workflows directory even with contents: write permission.
The permission workflows: write is needed, which can't be granted through the permission block. See peter-evans/create-pull-request#3558

Pull request configuration updates:

Checklist

  • I have added or updated appropriate labels to this PR
  • I have tested my changes
  • I have updated the documentation if needed

Copilot AI review requested due to automatic review settings May 30, 2025 13:57
@github-actions github-actions bot added the maintenance Maintenance work on the repository label May 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR switches the self-references update workflow to use a Personal Access Token for committing changes to workflow files and cleans up reviewer/label settings.

  • Adds explanatory comments about using EXERCISE_TOOLKIT_TOKEN PAT
  • Updates the Create Pull Request step to use the PAT instead of GITHUB_TOKEN
  • Removes the reviewers field and the maintenance label
Comments suppressed due to low confidence (2)

.github/workflows/_update-self-references.yml:43

  • [nitpick] The secret name EXERCISE_TOOLKIT_TOKEN could be made more self-documenting by including PAT (e.g. EXERCISE_TOOLKIT_PAT) to clearly indicate it holds a Personal Access Token.
token: ${{ secrets.EXERCISE_TOOLKIT_TOKEN }}

.github/workflows/_update-self-references.yml:5

  • To follow least-privilege principles, add an explicit permissions block at the top (e.g., permissions: contents: write, workflows: write) so the workflow doesn’t grant more permissions than necessary.
name: Update Self-References

@FidelusAleksander FidelusAleksander merged commit dd3788a into main May 30, 2025
6 checks passed
@FidelusAleksander FidelusAleksander deleted the fix-update-refs-workflow branch May 30, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance work on the repository

Development

Successfully merging this pull request may close these issues.

2 participants