You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: Getting issues was blocked by the error: Resource not accessible by integration #1307
Description:
We have issues disabled for our repository. When running the stale action, we get the error mentioned in the title.
Action version:
10
Platform:
Ubuntu
macOS
Windows
Runner type:
Hosted
Self-hosted
Repro steps:
name: "Close stale PRs"
on:
schedule:
- cron: "0 6 * * *" # Runs daily at 6:00 AM UTC
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/stale@v10
with:
days-before-pr-stale: 7 # Number of days of inactivity before marking as stale
stale-pr-message: "This Pull Request is stale because it has been open 7 days with no activity."
days-before-pr-close: 7 # Number of days after marking as stale before closing
close-pr-message: "Closing this Pull Request due to inactivity."
days-before-issue-stale: -1 # Disables marking issues as stale
days-before-issue-close: -1 # Disables closing stale issues
Thank you for your report!
The error occurred because the workflow token did not have the required “Issues” (read) repository permission. According to the GitHub REST API documentation for listing repository issues (listForRepo — GET /repos/{owner}/{repo}/issues), this endpoint returns both issues and pull requests, as every pull request is also represented as an issue in GitHub’s data model.
In the actions/stale workflow, this endpoint is used to retrieve all issues and PR items.
Because it returns both, the workflow requires Issues: read permission — even if your workflow input is configured to target only pull requests. In private repositories, missing this permission causes the request to be blocked, which leads to the error you encountered.
Once you explicitly add the Issues: read permission to your workflow, the problem will be resolved. This behavior is expected and aligns with GitHub’s fine-grained access model.
Activity
v-chiranjib-swain commentedon Dec 4, 2025
Hello @wongk ,
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
v-chiranjib-swain commentedon Dec 11, 2025
Thank you for your report!
The error occurred because the workflow token did not have the required “Issues” (read) repository permission. According to the GitHub REST API documentation for listing repository issues (
listForRepo — GET /repos/{owner}/{repo}/issues), this endpoint returns both issues and pull requests, as every pull request is also represented as an issue in GitHub’s data model.In the actions/stale workflow, this endpoint is used to retrieve all issues and PR items.
Because it returns both, the workflow requires
Issues: readpermission — even if your workflow input is configured to target only pull requests. In private repositories, missing this permission causes the request to be blocked, which leads to the error you encountered.Once you explicitly add the
Issues: readpermission to your workflow, the problem will be resolved. This behavior is expected and aligns with GitHub’s fine-grained access model.wongk commentedon Dec 11, 2025
Thank you for this detailed information. The action is working now.