website icon indicating copy to clipboard operation
website copied to clipboard

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

Open dvernon5 opened this issue 7 months ago • 24 comments

Overview

We need a new GitHub Action to detect when an assigned issue is closed without either a linked pull request (PR), an Ignore label, or a non-PR contribution label so that these issues are not lost.

Action Items

  • [x] Create a label: non-PR contribution
    • Description: "For wiki additions/revisions, audit spreadsheet contributions, issue-making ERs and Epics, etc."
  • [x] Create a new GitHub Action with the following features
    • [x] Reopen issues that are closed without:
      • A linked PR,
      • An Ignore label, OR
      • A non-PR contribution label
    • [x] The automation should add the label: ready for product
    • [x] The automation should leave a comment on the issue with this text
      This issue was reopened because it did not have any of the following:
      - A linked PR,
      - An `Ignore` label
      - A `non-PR contribution` label
      
    • [x] The automation should move the issue to the "Questions / In Review" column on the project board

Resources/Instructions

Never done GitHub actions? Start here! Hack for LA's Github Actions (latest)

Note that you might want to do something outside the scope of the above pseudo-code. If so, be sure to leave comments in your PR or this issue that justify your reasoning. If you feel you need guidance, be sure to reach out! We cannot foresee whether this issue is solvable, or what hard decisions have to be made, but we would love to hear and help you!

Additional resources:

Events that trigger workflows Workflow syntax for GitHub Actions GitHub GraphQL

Related Issues

This issue was initiated by ER #6291

dvernon5 avatar May 14 '25 16:05 dvernon5

Hi @dvernon5.

Please don't forget to add the proper labels to this issue. Currently, the labels for the following are missing:

  • Complexity, Role, Feature, Size

NOTE: Please ignore this comment if you do not have 'write' access to this directory.

To add a label, take a look at Github's documentation here.

Also, don't forget to remove the "missing labels" afterwards. To remove a label, the process is similar to adding a label, but you select a currently added label to remove it.

After the proper labels are added, the merge team will review the issue and add a "Ready for Prioritization" label once it is ready for prioritization.

Additional Resources:

github-actions[bot] avatar May 14 '25 16:05 github-actions[bot]

Hey @dvernon5 Thanks for working on this! I left some comments on Slack

t-will-gillis avatar May 18 '25 03:05 t-will-gillis

Hey again @dvernon5 Changes look great!

t-will-gillis avatar May 18 '25 23:05 t-will-gillis

Hi @belunatic, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

HackforLABot avatar Jun 17 '25 03:06 HackforLABot

ETA: 06/27/25 Available: W (12pm) F (12pm)

belunatic avatar Jun 17 '25 03:06 belunatic

ETA: 07/11/25 Available: W (12pm) F (12pm)

belunatic avatar Jun 26 '25 22:06 belunatic

I promise to have this done in two weeks time before the Picnic ETA : 08/02/25 Available: W (12pm) F (12pm)

belunatic avatar Jul 11 '25 17:07 belunatic

@belunatic

Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, July 29, 2025 at 12:09 AM PST.

HackforLABot avatar Aug 01 '25 07:08 HackforLABot

Progress: "I am still working on it, trying to figure it out, once I have a but of grasp on it, I will reach out for assistance, make sure it it working"
Blockers: "I have been working, opening up a new store and it took us two weeks, but soon I will have more time and to invest in it."
Availability: "this week will have 4 hours"
ETA: "08/24"

belunatic avatar Aug 11 '25 20:08 belunatic

@belunatic

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, August 19, 2025 at 12:05 AM PST.

HackforLABot avatar Aug 22 '25 07:08 HackforLABot

@belunatic

Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, August 26, 2025 at 12:05 AM PST.

HackforLABot avatar Aug 29 '25 07:08 HackforLABot

@belunatic

Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, September 2, 2025 at 12:05 AM PST.

HackforLABot avatar Sep 05 '25 07:09 HackforLABot

I am sorry it has been difficult to get to this one, but if anyone wants this they can remove me he from this task and take over. Sorry and Thanks for everyone patients.

belunatic avatar Sep 07 '25 22:09 belunatic

@belunatic

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Tuesday, September 16, 2025 at 12:05 AM PST.

HackforLABot avatar Sep 19 '25 07:09 HackforLABot

I am sorry it has been difficult to get to this one, but if anyone wants this they can remove me he from this task and take over. Sorry and Thanks for everyone patients.

Hi @belunatic I will unassign you in case there is someone with time to work on this. If later on you know that you have time to work on this, and this issue is still available, feel free to reassign yourself to complete it. Thanks

t-will-gillis avatar Sep 19 '25 19:09 t-will-gillis

Hi @myronchen-git, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

HackforLABot avatar Nov 13 '25 22:11 HackforLABot

Availability: 1 - 3 PM ETA: 12/6/2025

myronchen-git avatar Nov 13 '25 22:11 myronchen-git

@myronchen-git

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'status: To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the Questions/In Review column of the Project Board and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel. Please note that including your questions in the issue comments- along with screenshots, if applicable- will help us to help you. Here and here are examples of well-formed questions.

You are receiving this comment because your last comment was before Monday, November 17, 2025 at 11:05 PM PST.

HackforLABot avatar Nov 21 '25 07:11 HackforLABot

  1. Progress: I have created the non-PR contribution label. I have figured out the core code to detect which issues should be opened. I have some code for changing the project status of an issue and am currently testing it. I still have to write code for adding the ready for product label and for creating a comment.
  2. Blockers: None.
  3. Availability: 10 AM - 12 PM, Monday - Thursday. 9 AM - 2 PM Saturday.
  4. ETA: 12/6/2025

myronchen-git avatar Nov 22 '25 04:11 myronchen-git

Regarding setting the project status to "Questions / In Review" when reopening an issue, what should I do if an issue is not already assigned to a project? Should the automation do nothing in relation to projects, or should an issue be automatically assigned to a default project?

myronchen-git avatar Nov 22 '25 22:11 myronchen-git

Hi @myronchen-git

Regarding setting the project status to "Questions / In Review" when reopening an issue, what should I do if an issue is not already assigned to a project? Should the automation do nothing in relation to projects, or should an issue be automatically assigned to a default project?

  • All of the issues that this automation checks will already be linked to the website project, so you don't need to check this.
  • Also- note that there is an existing utility: mutate-issue-status.js for changing the status value.
  • You may need to query status values and get the item id before running mutate-issue-status.js. There is a utility for that also: query-issue-info.js

t-will-gillis avatar Nov 22 '25 22:11 t-will-gillis

Is it possible, or will there ever be a case, to have an issue's project status to be "no status"? The GitHub Action utility, queryIssueInfo (github-actions\utils\query-issue-info.js), will throw an Error if status is "no status".

myronchen-git avatar Nov 22 '25 23:11 myronchen-git

It shouldn't be possible (haha) but recently an automation crashed because someone was able to remove the status on their Skills Issue. So if you want to put in a try...catch here that would be good.

t-will-gillis avatar Nov 23 '25 00:11 t-will-gillis

It shouldn't be possible (haha) but recently an automation crashed because someone was able to remove the status on their Skills Issue. So if you want to put in a try...catch here that would be good.

I recommend fixing query-issue-info.js to return statusName and statusId as undefined if there is no project status, but I do not fully know what impact it will have on current code. I did a quick search through the repository and it seems like existing code will function normally, as all uses of the status variables are through equality checks and nothing seems to be dependent on the thrown Errors.

I'm thinking of creating an emergent request to fix this.

myronchen-git avatar Nov 27 '25 01:11 myronchen-git