Skip to content

Conversation

Copy link

Copilot AI commented Oct 2, 2025

Summary

Added the actions: write permission to the stale job in the .github/workflows/close-stale.yml workflow file.

Background

The actions/stale action requires the actions: write permission because it deletes its old cache before saving a new one. Without this permission, the action may fail or not function correctly when managing stale issues and pull requests.

Changes

  • Added actions: write permission to the job-level permissions block in the stale job
  • Positioned the permission before issues: write and pull-requests: write as per the natural order
  • Included a trailing comment explaining why this permission is needed, matching the style of existing permission comments

The updated permissions block now includes:

permissions:
  actions: write # because actions/stale deletes its old cache before saving new one
  issues: write # required for closing stale issues
  pull-requests: write # required for closing stale PRs

Fixes the issue where the workflow was missing the necessary permissions for the stale action to fully manage its cache.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add missing actions/stale permission</issue_title>
<issue_description>Check if any workflow jobs are using actions/stale.

If so, make sure that the permissions block for that job contains

actions: write

If any of the other permissions lines have trailing comments, then add a trailing comment for this one too:

actions: write # because actions/stale deletes its old cache before saving new one

Place this new permission in a specific order within the permissions, directly before both:

issues: write
pull-requests: write

(which implicitly means after contents: read)</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #34

✨ 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] Add missing actions/stale permission Add missing actions: write permission to close-stale workflow Oct 2, 2025
Copilot AI requested a review from trask October 2, 2025 05:20
Copilot finished work on behalf of trask October 2, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing actions/stale permission

2 participants