Skip to content

Bug: stale action interacts with Discussions converted from issues #1328

@cnavarro-prestashop

Description

@cnavarro-prestashop

Description:
The action posts stale comments and applies stale labels on GitHub Discussions that were converted from issues, even though the conversion happened before the action ran. The action should never interact with Discussions.

Action version:
actions/stale@v10

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

  1. Have an open issue with no recent activity
  2. Convert that issue to a Discussion via GitHub's "Convert to discussion" feature
  3. Run actions/stale on the repository
  4. The action posts a stale comment and applies the stale label on the Discussion

Real-world example: PrestaShop/PrestaShop#41076 (comment)

Expected behavior:
The action should only process open issues (and optionally PRs). Discussions — including those converted from issues — should be completely ignored.

Actual behavior:
The action comments on and labels Discussions that were previously issues. The root cause is likely that the action uses GitHub's GraphQL search API, which still indexes converted discussions and returns them in issue search results. Since Discussions also support comments and labels via GraphQL, the action interacts with them unintentionally.

Note: the REST API endpoint GET /repos/{owner}/{repo}/issues does not return converted discussions, so filtering on item type or switching to that endpoint would likely fix the issue.

Workaround found:
We'll add a label Converted from issue to add in exempt-issue-labels as a quick fix.

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