website icon indicating copy to clipboard operation
website copied to clipboard

GitHub Actions: Remove merged PRs from the Project Board

Open SAUMILDHANKAR opened this issue 3 years ago • 28 comments

Overview

As a developer, we have to ensure that our kanban board is organized for all teams so that productivity is high. For this issue, we want the project cards of the merged pull requests to automatically be removed from the Project Board.

Action Items

  • [x] Review the notes below to understand the GitHub actions architecture we are currently moving towards
  • [x] This should be a new job under the "PR Trigger" workflow
    • [x] This job should trigger whenever a PR is merged
    • [x] This job should have an if statement that triggers when the event name is "pull_request" and event action is "merged"
      • if: ${{ github.event_name == 'pull_request' && github.event.action == 'merged'}}
    • [x] This job should run in parallel with other actions that may exist in the trigger file

Pseudo-code

  • [ ] When a pull request is merged
    • [ ] Remove the pull request from the project board.

Checks

  • [ ] Test in your local environment that it works
  • [ ] If a reviewer merges a pr and does not remove the pr from the Project Board, the GitHub action should automatically remove the pr from the Project Board
  • [ ] If a reviewer merges a pr and moves it to the Project Board, the GitHub action should move it to the correct column in the Project Board and then remove it
  • [ ] If the column the pr is going to has automation turned on, the GitHub action should still trigger and remove the issue without causing any weird issues / side effects

Resources/Instructions

Never done GitHub actions? Start here! GitHub Complex Workflows doc GitHub Actions Workflow Directory Events that trigger workflows Workflow syntax for GitHub Actions actions/github-script GitHub RESTAPI

Architecture Notes

Currently, we want our GitHub Actions to be structured like so based on this proposal:

  • Schedules (military time) - Schedule Friday 0700 - Schedule Thursday 1100 - Schedule Daily 1100
  • Linters - Lint SCSS
  • PR Trigger - Add Linked Issue Labels to Pull Request - Add Pull Request Instructions
  • Issue Trigger - Add Missing Labels To Issues
  • WR - PR Trigger - WR Add Linked Issue Labels to Pull Request - WR Add Pull Request Instructions
  • WR - Issue Trigger

Actions with the same triggers (excluding linters, which will be their own category) will live in the same github action file. Scheduled actions will live in the same file if they trigger on the same schedule (i.e. all files that trigger everyday at 11am will live in one file, while files that trigger on Friday at 7am will be on a separate file).

That said, this structure is not set in stone. If any part of it feels strange, or you have questions, feel free to bring it up with the team so we can evolve this format!

SAUMILDHANKAR avatar Dec 16 '21 03:12 SAUMILDHANKAR

Hi @SAUMILDHANKAR.

Good job adding the required labels for this issue. The merge team will review the issue and add a "Ready for Milestone" label once it is ready for prioritization.

Additional Resources:

github-actions[bot] avatar Dec 16 '21 03:12 github-actions[bot]

ETA : one week Availability : Flexible

harshitasao avatar Apr 06 '22 06:04 harshitasao

Progress : Going through the linked docs to make myself familiar with Github Actions. Blockers : None so far. Availability : Flexible. ETA : Till next Sunday.

harshitasao avatar Apr 10 '22 18:04 harshitasao

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, April 19, 2022 at 12:20 AM PST.

github-actions[bot] avatar Apr 22 '22 07:04 github-actions[bot]

Progress: 4 task completed, Some are left. Blockers: Have some clarification questions. Availability: Sunday (11am-1pm) IST ETA: Till Wednesday

harshitasao avatar Apr 23 '22 16:04 harshitasao

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, May 3, 2022 at 12:20 AM PST.

github-actions[bot] avatar May 06 '22 07:05 github-actions[bot]

Progress: Almost done. Blockers: Have some doubts. Availability: Monday (3pm-5pm) IST ETA: As quickly as possible.

harshitasao avatar May 08 '22 13:05 harshitasao

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, May 17, 2022 at 12:21 AM PST.

github-actions[bot] avatar May 20 '22 07:05 github-actions[bot]

Progress: not much progress. Blockers: None. Availability: Wednesday, Thursday, Friday 2 hours. ETA: ASAP.

harshitasao avatar May 24 '22 05:05 harshitasao

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, May 31, 2022 at 12:19 AM PST.

github-actions[bot] avatar Jun 03 '22 07:06 github-actions[bot]

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, June 7, 2022 at 12:21 AM PST.

github-actions[bot] avatar Jun 10 '22 07:06 github-actions[bot]

@harshitasao

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: "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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, June 14, 2022 at 12:19 AM PST.

github-actions[bot] avatar Jun 17 '22 07:06 github-actions[bot]

Hi @harshitasao, I noticed you haven't left a progress update on your issue recently. Please comment an update if you're still interested in working on this issue.

tamara-snyder avatar Jun 23 '22 21:06 tamara-snyder

@harshitasao

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, June 21, 2022 at 12:20 AM PST.

github-actions[bot] avatar Jun 24 '22 07:06 github-actions[bot]

@harshitasao

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, June 28, 2022 at 12:21 AM PST.

github-actions[bot] avatar Jul 01 '22 07:07 github-actions[bot]

@harshitasao

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, July 5, 2022 at 12:19 AM PST.

github-actions[bot] avatar Jul 08 '22 07:07 github-actions[bot]

@harshitasao

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, July 12, 2022 at 12:20 AM PST.

github-actions[bot] avatar Jul 15 '22 07:07 github-actions[bot]

@harshitasao

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, July 19, 2022 at 12:21 AM PST.

github-actions[bot] avatar Jul 22 '22 07:07 github-actions[bot]

@harshitasao I am removing you from this issue because we have not heard from you since May. If you are still working on it, you can reassign and move back into the inprogress.

ExperimentsInHonesty avatar Jul 25 '22 21:07 ExperimentsInHonesty

Hi @attali-david, 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 :)

github-actions[bot] avatar Sep 04 '22 14:09 github-actions[bot]

i. Availability: 9/4-9/6 ii. ETA: 9/6 EOD

attali-david avatar Sep 04 '22 17:09 attali-david

Blocker: I've read all the documentation referenced in the instruction, but I don't understand the documentation for the context actions/github-script. As described here, I don't see how I can access the project card ID in order to delete it.

What I've done so far:

  1. I created a yml file under .github/workflows based on the HackForLa guidelines found here.
  2. I created a script under github-actions/trigger-pr based on the same guidelines.
  3. I looked at other scripts in github-actions directory.
  4. I read the context documentation here

If someone could direct me to the right page or maybe some examples, I'd greatly appreciate it.

attali-david avatar Sep 06 '22 20:09 attali-david

Blocker: I've read all the documentation referenced in the instruction, but I don't understand the documentation for the context actions/github-script. As described here, I don't see how I can access the project card ID in order to delete it.

What I've done so far:

1. I created a yml file under .github/workflows based on the HackForLa guidelines found [here](https://github.com/hackforla/website/wiki/Hack-for-LA's-GitHub-Actions).

2. I created a script under github-actions/trigger-pr based on the same guidelines.

3. I looked at other scripts in github-actions directory.

4. I read the context documentation [here](https://docs.github.com/en/actions/learn-github-actions/contexts)

If someone could direct me to the right page or maybe some examples, I'd greatly appreciate it.

Again, it's late for me but let me know if this is not helpful...

blulady avatar Sep 13 '22 04:09 blulady

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, September 13, 2022 at 12:32 AM PST.

github-actions[bot] avatar Sep 16 '22 07:09 github-actions[bot]

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, September 20, 2022 at 12:39 AM PST.

github-actions[bot] avatar Sep 23 '22 07:09 github-actions[bot]

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, September 27, 2022 at 12:45 AM PST.

github-actions[bot] avatar Sep 30 '22 07:09 github-actions[bot]

@attali-david Hi, this issue has not been updated in over 2 weeks. If you are still interested in working with HfLA, please let us know by updating your ETA and Availability. Also, plese reach out on Slack if you are still having a blocker, we can help. If we don't hear back within 7 days, we will unassign you from this issue and put it back in the queue. Thanks!

kathrynsilvaconway avatar Oct 04 '22 02:10 kathrynsilvaconway

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, October 4, 2022 at 12:32 AM PST.

github-actions[bot] avatar Oct 07 '22 07:10 github-actions[bot]

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, October 11, 2022 at 12:39 AM PST.

github-actions[bot] avatar Oct 14 '22 07:10 github-actions[bot]

@attali-david

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 developer meeting discussion column 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.

You are receiving this comment because your last comment was before Tuesday, October 18, 2022 at 12:33 AM PST.

github-actions[bot] avatar Oct 21 '22 07:10 github-actions[bot]