website icon indicating copy to clipboard operation
website copied to clipboard

GitHub Actions: Place newly opened PRs into the Project Board

Open macho-catt opened this issue 3 years ago • 20 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 newly created pull requests to automatically be placed in the Project Board.

Action Items

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

Pseudo-code

  • [ ] When a pull request is opened
    • [ ] Create a new project card in the Project Board "PR needs review" Column and assign this issue's ID in that card

Checks

  • [ ] Test in your local environment that it works
  • [ ] If a user creates a pr and does not add the issue to the Project Board, the GitHub action should automatically add the issue to the Project Board in the right column
  • [ ] If a user creates an issue and adds it properly to the Project Board, the GitHub action should also add the issue to the correct column in the Project Board
  • [ ] If the column the issue is going to has automation turned on, the GitHub action should still trigger and add the issue to the right column without causing any weird issues / side effects

Merge Team or Technical Leads

Once the pull request associated with this issue is approved and merged, please update https://github.com/hackforla/website/issues/2670 by

  • [ ] Checking off the dependency for this issue
  • [ ] If both dependencies are checked off, please release that issue

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!

macho-catt avatar Oct 25 '21 02:10 macho-catt

Hi @macho-catt.

Good job adding the required labels to this issue.

Additional Resources: Wiki: How to add status labels to issues (WIP. Link will be updated when the wiki is done) Wiki: How to create issues (WIP. Link will be updated when the wiki is done)

github-actions[bot] avatar Oct 25 '21 02:10 github-actions[bot]

hi @edeneault, please move this to the "in progress" column of the project board. Thanks!

macho-catt avatar Nov 05 '21 21:11 macho-catt

Done. Thanks for the reminder.

On Fri, Nov 5, 2021 at 2:20 PM Matthew Cacho @.***> wrote:

hi @edeneault https://github.com/edeneault, please move this to the "in progress" column of the project board. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hackforla/website/issues/2395#issuecomment-962228032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQQAEXLCXCOCAH3HI5OVQMTUKRKDVANCNFSM5GUFBV7A .

-- Etienne Deneault https://etiennedeneault.com/ @.*** 702 677-1326

edeneault avatar Nov 05 '21 21:11 edeneault

Hi Matt,

I have a question about the checks in this issue... They refer to users opening up an issue, but this particular issue is about creating PR cards for newly opened PR's. Is it just copy/paste error?

A+

Etienne

edeneault avatar Nov 10 '21 21:11 edeneault

@edeneault Yup, it's just a copy paste error. It should be Pull Requests.

macho-catt avatar Nov 10 '21 21:11 macho-catt

@edeneault

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 Thursday, November 18, 2021 at 4:50 PM PST.

github-actions[bot] avatar Nov 22 '21 00:11 github-actions[bot]

@edeneault

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 Monday, November 22, 2021 at 11:19 PM PST.

github-actions[bot] avatar Nov 26 '21 07:11 github-actions[bot]

Progress: Still pending resolution of permissions issue in PR Blockers: Permissions issue when submitting PR. GHA functions correctly on branch. Availability: 2-4 hrs ETA: TBD based on troubleshooting of permissions issue.

Details: Permissions issue is not resolved yet. I pushed to my branch and added checkoutV2 as the first step using HLFA Bot token. Waiting for advice on how to proceed.

Note: many PR open/close actions will appear in this thread due to it being a mechanism to trigger the PR on the master branch.

edeneault avatar Nov 29 '21 18:11 edeneault

@edeneault

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 Monday, November 29, 2021 at 11:19 PM PST.

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

Progress: Progress Negative - need to re-code due to incompatibility of GHA action Blockers: no blockers Availability: Unsure. Started new job, not sure what the time demand will be. ETA: 2 weeks Pictures: N/A back-end

edeneault avatar Dec 04 '21 14:12 edeneault

@edeneault

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 Monday, December 6, 2021 at 11:19 PM PST.

github-actions[bot] avatar Dec 10 '21 07:12 github-actions[bot]

Hi @edeneault I thought I would check in with you to see how the new job is going?

We are going to close the pr related to this issue, since it requires a full rewrite. If you want to work on this issue and your schedule allows, please let us know and we will keep you assigned, otherwise you can pick up a new issue when you become free again. Will unassign you on 2021-12-18 if you haven't heard anything

ExperimentsInHonesty avatar Dec 12 '21 23:12 ExperimentsInHonesty

Hi Bonnie,

I hope that this message finds you well. I apologize for going MIA for the last two weeks, starting the new job has required a lot of work. I loved it and I am learning a lot which makes me happy. I would like to ask if you would be Ok with me taking a 4 week hiatus until I get adjusted to the work volume at work? I really want to keep contributing to HFLA, I just have a little bit too much going on right now. As to the PR, yes indeed, it should be closed because it needs a full rewrite. If the issue is still uncompleted when I come back, I would be happy to re-visit and write the necessary js for it.

All the best,

--Etienne

On Sun, Dec 12, 2021 at 3:36 PM Bonnie Wolfe @.***> wrote:

Hi @edeneault https://github.com/edeneault I thought I would check in with you to see how the new job is going?

We are going to close the pr related to this issue, since it requires a full rewrite. If you want to work on this issue and your schedule allows, please let us know and we will keep you assigned, otherwise you can pick up a new issue when you become free again. Will unassign you on 2021-12-18 if you haven't heard anything

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hackforla/website/issues/2395#issuecomment-991993753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQQAEXJBD5EZ76WASPIAP23UQUWXRANCNFSM5GUFBV7A .

-- Etienne Deneault https://etiennedeneault.com/ @.*** 702 677-1326

edeneault avatar Dec 13 '21 13:12 edeneault

Moving the issue back to prioritized backlog.

SAUMILDHANKAR avatar Dec 30 '21 09:12 SAUMILDHANKAR

@edeneault Hope you had a lovely holiday. Thank you for the response (it helped us clean this up). We hope your new job is great and look forward to having you back anytime. 🥇

ExperimentsInHonesty avatar Jan 02 '22 20:01 ExperimentsInHonesty

Progress: Just started. Blockers: None so far Availability: 4 - 6 hours ETA: Not sure. Tentative: next Sunday Availability: Saturday/Sunday (4 hours)

poorvi4 avatar Apr 24 '22 00:04 poorvi4

@poorvi4 Unassigning you from this issue because you have more than one issue assigned to you right now (not including prework issue). Thank you. Note: One should not pick up a new issue until the PR for their previous issue has been merged.

SAUMILDHANKAR avatar May 07 '22 20:05 SAUMILDHANKAR

Hi @raswani2023, 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 Jul 18 '22 17:07 github-actions[bot]

Availability: 3hrs ETA: Saturday

raswani2023 avatar Jul 21 '22 17:07 raswani2023

Discuss during team meeting 2022-07-24. Discussed that there was confusion about why this was needed. There is already a GitHub automation that adds new PRs directly into PR Needs Review column. Kathryn to follow up with Matt about it.

raswani2023 avatar Jul 24 '22 17:07 raswani2023

Clarification in respronse to @raswani2023 's comment above: This issue seeks to create automation that will automatically place PRs on the board when they are opened. Currently, they do NOT automatically go on the baord, but must be placed there manually under the projects section. Once they are on the board, we already have automation in place that will put them in "PR Needs Review" column.

kathrynsilvaconway avatar Sep 13 '22 04:09 kathrynsilvaconway

Hi @jdingeman, 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 Nov 14 '22 04:11 github-actions[bot]

ETA: 11/23/2022 Availability: Sporadic availability due to work, mostly afternoons/evenings after 3:30pm

jdingeman avatar Nov 14 '22 04:11 jdingeman

Update: Blockers: I need to study GHAs more in depth to get an understanding of how to write the program. Testing is dependent on having a copy of the project board so I can see if the actions are working. But the actions that already exist on the website's project board do not work on my project board. ETA: Hopefully by next Friday, 12/9

jdingeman avatar Nov 29 '22 03:11 jdingeman

Blocker: I thought I would be able to make the same action that Will did in #3897, however I have not gotten it to work. It seems to be skipping the workflow whenever I test a pull request into my own copy of the project board. I am not sure why this is.

jdingeman avatar Feb 07 '23 05:02 jdingeman

Placing this back into the prioritized backlog due to time constraints. I tried the approach that Will took in pull-request-trigger.yml for his Gather and Merge PR functions, but I could not seem to produce a successful outcome to add the newly created PR onto the board. I heed caution to the next dev to work on this to keep track of your branches when testing in your local, as it can get messy trying to create pull requests into your own repo.

jdingeman avatar Feb 24 '23 02:02 jdingeman

Hi @MattPereira, 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 Feb 26 '23 20:02 github-actions[bot]

Availability: 7 - 9 PM Sunday - Thursday ETA: TBD

MattPereira avatar Feb 26 '23 20:02 MattPereira

@hackforla/website-merge This issue needs a cleanup before going back into the prioritized backlog. Please resolve all comments and if changes are needed to the text at the top, please make it.

ExperimentsInHonesty avatar Mar 24 '23 04:03 ExperimentsInHonesty

Hi @t-will-gillis, 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 Mar 29 '23 01:03 github-actions[bot]