Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHAs Remove Merged PRs from Project Board #3846

Conversation

t-will-gillis
Copy link
Member

Fixes #2592

What changes did you make and why did you make them ?

  • PLEASE READ FIRST: This GitHub Action will NOT work with the revised 'Projects'. It will only with 'Project (classic)' i.e. the same as HfLA is using. This Pull Request should only be reviewed / tested by someone who can access 'Projects (classic).'

  • Edits are to pull-request-trigger.yml file.

    • This file includes two new jobs: Move-PR is intended to find all closed and 'merged' PRs and gather them in a single column immediately prior to the next step. Delete-Merged-PRs then deletes all 'merged' PRs from this same column.
    • (Note that there may be a way to combine these two jobs into a single one.)
  • I was able to create a mockup of the HfLA 'Project Board' but I was only able to partially test this action. However, the alex-page/github-project-automation-plus automation does not appear to work with the new 'Projects' (for example, the automation is looking for an object project , but for the new 'Projects' it is projects_v2, which the automation does not recognize.)

  • This automation is also used in the move-closed-issues action, which itself is working once again now that the token/ secrets have been reset.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied

image

Visuals after changes are applied

image

@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 t-will-gillis-remove-merged-prs-project-board-2592 gh-pages
git pull https://github.com/t-will-gillis/website.git remove-merged-prs-project-board-2592

@github-actions github-actions bot added automation for manulal github board maintenance actions that are going to be automated Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours Complexity: Medium Status: Updated No blockers and update is ready for review time sensitive Needs to be worked on by a particular timeframe labels Jan 21, 2023
@jdingeman
Copy link
Member

Availability: Saturday 1/21, M-F after 3pm
ETA: Depends on outcome of demonstration by developer.

Copy link
Member

@jdingeman jdingeman left a comment

Choose a reason for hiding this comment

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

Per our discussion, I am requesting changes so that developer can test within his own copy of the Projects (classic) in his own repo. Leaving this in PRs so we can track changes in code if applicable.

@t-will-gillis
Copy link
Member Author

t-will-gillis commented Jan 22, 2023

Update: The initial testing has been successful:

  • merged PRs are moving to the correct columns and ultimately are deleted from the Project Board.
  • deleting the issue for the merged PR does not affect the changes referenced by the PR itself

Now reviewing to make sure the branch, token, and other references are correct

@t-will-gillis
Copy link
Member Author

t-will-gillis commented Jan 22, 2023

  • I added the step needs: Move-PR to the job Delete-Merged-PRs to ensure that the move job occurs before the delete job.
  • I made many adjustments to the pull-request-trigger.yml file for the purposes of testing. These will need to be reverted prior to merging, mainly I added a local: branch reference, token, and project board name.
  • Need to discuss the similar action wr-pull-request-trigger.yml: what is the purpose/ intent for the WR actions?
  • Finally, I believe that this implementation only affects future issues. Do we want/need a workflow-dispatch to take care of existing merged prs, or simply delete each manually?

This is not ready to merge yet. @jdingeman do you want to arrange for us to do a live demo?

added 'needs: Move-PR'
@MattPereira MattPereira self-requested a review January 23, 2023 22:23
@MattPereira
Copy link
Contributor

Availability: Today 4 - 5 PM
ETA: TBD after meeting at 4 today

@jdingeman
Copy link
Member

jdingeman commented Jan 24, 2023

Developer demonstrated workflow and will clean up the branch so we can do a clean test on the HfLA gh-pages.
Notes:

  • Workflow only affects PRs that have merged since its implementation -- it will not remove any old PRs from the board
  • PRs will remain in the repo, and they are not hard deleted from the repo, they are only removed from the project board as if they were archived (but still working)
  • Suggested dev remove 'feature-homepage-launch' from the pr trigger file to prevent feature branch merges from being removed from the board. See comment here
    • This can make way for a new issue to move feature branch merges to the correct column instead of being sent to 'test-approved-by-reviewer'

@t-will-gillis
Copy link
Member Author

I am closing this PR, then opening a new PR under a clean branch.

@t-will-gillis
Copy link
Member Author

Moved this to column 'IGNORE: PRs closed without being merged' since this PR was replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation for manulal github board maintenance actions that are going to be automated Complexity: Medium Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours Status: Updated No blockers and update is ready for review time sensitive Needs to be worked on by a particular timeframe
Projects
Development

Successfully merging this pull request may close these issues.

GitHub Actions: Remove merged PRs from the Project Board
3 participants