Skip to content

Error: Getting issues was blocked by the error: Resource not accessible by integration #1307

Closed

Description

@wongk

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

Expected behavior:
No error

Actual behavior:
See above

Activity

  1. v-chiranjib-swain commented on Dec 4, 2025

    @v-chiranjib-swain
    Contributor

    Hello @wongk ,
    Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

  2. v-chiranjib-swain commented on Dec 11, 2025

    @v-chiranjib-swain
    Contributor

    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.

  3. wongk commented on Dec 11, 2025

    @wongk
    Author

    Thank you for this detailed information. The action is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions