Skip to content

Conversation

@myronchen-git
Copy link
Member

@myronchen-git myronchen-git commented Nov 27, 2025

Fixes #8139

What changes did you make?

  • Created a new GitHub Actions workflow to check closed issues without any linked PRs or appropriate excusing labels, and reopen them.
  • Created a JavaScript file to store the main code to check a closed issue. This checks if there is a "non-PR contribution" label or a label containing the word "Ignore". If there aren't any of those labels, then this checks how many linked PRs there are.
  • Created a JavaScript file to store the main code for reopening the aforementioned issue, adding a "ready for product" label to it, changing the project status to "Questions / In Review" in it, and posting a comment explaining the reason in it.

Why did you make the changes (we will use this info to test)?

  • To prevent losing track of issues that were accidentally closed.
  • The checks for the "non-PR contribution" and "Ignore" labels are required for instances where the issues are not fixed through code or for issues that should be ignored.
  • In check-issue-labels-and-linked-prs.js, a direct GitHub GraphQL request is made instead of using the utility file find-linked-issue.js, because it queries GitHub for a direct number of linked PRs while the utility file only checks an issue's description through regex. This methodology should be more reliable.
  • Reopened issues are given a "ready for product" label and have their project status changed, because those help give visibility to the team.
  • Tests for reopen-issue.js are skipped, because that file does not contain any logic, other than rethrowing Errors.

CodeQL Alerts

After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.

Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
Instructions for resolving CodeQL alerts

If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.

In general, CodeQL alerts should be resolved prior to PR reviews and merging

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

  • No visual changes to the website

@github-actions
Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b myronchen-git-check-closed-issue-for-linked-pr-8139 gh-pages
git pull https://github.com/myronchen-git/website.git check-closed-issue-for-linked-pr-8139

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Large status: Updated No blockers and update is ready for review Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly size: 5pt Can be done in 19-30 hours Lang: GHA GitHub Actions labels Nov 27, 2025
uses: actions/github-script@v8
id: reopen-issue
with:
github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not 100% sure that this is the correct token to use. This workflow does need project permission though.

Comment on lines +64 to +65
{ name: 'good first issue' },
{ name: 'size: 1pt' },
Copy link
Member Author

Choose a reason for hiding this comment

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

Testing for when issues have other labels as well.

Comment on lines +36 to +37
{ name: 'good first issue' },
{ name: 'size: 1pt' },
Copy link
Member Author

Choose a reason for hiding this comment

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

Testing for when issues have other labels as well.

// Assert
expect(result).toBe(true);
expect(github.graphql).toHaveBeenCalledWith(
expect.stringContaining('query'),
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't really care how the query is constructed, as long as it returns the number of linked PRs.

// Assert
expect(result).toBe(false);
expect(github.graphql).toHaveBeenCalledWith(
expect.stringContaining('query'),
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't really care how the query is constructed, as long as it returns the number of linked PRs.

@t-will-gillis
Copy link
Member

t-will-gillis commented Dec 1, 2025

@myronchen-git I think this was closed by mistake- the bot should have closed #8439 and didn't. Let me know if you think it is something else...

@myronchen-git
Copy link
Member Author

@myronchen-git I think this was closed by mistake- the bot should have closed #8439 and didn't. Let me know if you think it is something else...

Understood. Thanks for fixing this.

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

Labels

Complexity: Large Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly Lang: GHA GitHub Actions role: back end/devOps Tasks for back-end developers size: 5pt Can be done in 19-30 hours status: Updated No blockers and update is ready for review

Projects

Development

Successfully merging this pull request may close these issues.

Create GitHub Actions: Detect issues closed w/o PR or ignore

3 participants