Skip to content

[OBPIH-6479, OBPIH-6483] PR labeler, PR template description#4687

Merged
ewaterman merged 8 commits intodevelopfrom
feature/OBPIH-6479-auto-label-pr
Jul 29, 2024
Merged

[OBPIH-6479, OBPIH-6483] PR labeler, PR template description#4687
ewaterman merged 8 commits intodevelopfrom
feature/OBPIH-6479-auto-label-pr

Conversation

@ewaterman
Copy link
Member

@ewaterman ewaterman commented Jun 24, 2024

This is a low-priority change so feel free to take your time reviewing it.

Tickets: https://pihemr.atlassian.net/browse/OBPIH-6483 https://pihemr.atlassian.net/browse/OBPIH-6479

Background info: https://pihemr.atlassian.net/wiki/spaces/OB/pages/3066658817/DISCOVERY+OBPIH-6376+Standardize+GitHub+branching+practices#Pull-Request-Rules

Added a new GitHub action for automatically labelling a pull request based on the branch name and what files are changed. You can see some of the labels being automatically applied in this PR.

The goal is to be able to determine the type of change made by a PR just by looking at its labels. This will hopefully make reviewing easier in that we can filter reviews by things like frontend/backend and also will make searching for reviews, discussions, and issues easier. We can add more labels in the future if we want.

I also added a pull request template pull_request_template.md that will auto fill for every new PR. That way we can ensure all PRs are clearly describing their changes and are following our code guidelines

@ewaterman ewaterman added the status: work in progress For issues or pull requests that are in progress but not yet completed label Jun 24, 2024
@github-actions github-actions bot added type: feature A new piece of functionality for the app domain: frontend Changes or discussions relating to the frontend UI domain: devops labels Jun 24, 2024
@ewaterman ewaterman changed the title PR labeler, PR title validator, PR template description [OBPIH-6479, OBPIH-6480, OBPIH-6483] PR labeler, PR title validator, PR template description Jun 24, 2024
@ewaterman ewaterman removed the domain: frontend Changes or discussions relating to the frontend UI label Jun 24, 2024
@ewaterman ewaterman changed the title [OBPIH-6479, OBPIH-6480, OBPIH-6483] PR labeler, PR title validator, PR template description [OBPIH-6479, OBPIH-6483] PR labeler, PR template description Jun 24, 2024
@github-actions github-actions bot added the domain: devops Changes or discussions relating to dev ops automation label Jun 24, 2024
@@ -3,21 +3,32 @@
changelog:
Copy link
Member Author

Choose a reason for hiding this comment

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

This is for when we generate our release notes. It'll split the commits into sections based on the labels that were on their PRs.

It was already existing from a previous PR so I just fixed it to support the updated labels.

@@ -0,0 +1,32 @@
### :sparkles: Description of Change
Copy link
Member Author

Choose a reason for hiding this comment

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

This template will be auto-generated for every new PR. Feel free to suggest other things to add but maybe we can review it as a team in a tech huddle. I just wanted to have something for now

@ewaterman ewaterman removed the status: work in progress For issues or pull requests that are in progress but not yet completed label Jun 24, 2024
@ewaterman ewaterman self-assigned this Jun 24, 2024
@drodzewicz
Copy link
Collaborator

Look good to me! 🚀
One more thing that we should probably include is some kind of labeling for the PR of which release is this PR addressing.
There were many times in the past where I was going through git-logs and reviewing old PR's to see the reasoning for the change and wondered which release did this address, so maybe some text in the description or a tag would be a good addition
@ewaterman

@ewaterman
Copy link
Member Author

ewaterman commented Jul 6, 2024

@drodzewicz Yeah that would be useful. I'd definitely like for it to be automatic since I don't want people to have to remember both what version we're on and also to add the label. Maybe we could create a GitHub Action that pulls the version setting from gradle.properties https://github.com/openboxes/openboxes/blob/develop/gradle.properties#L8C1-L8C8 then adds a label using that version but I don't know how easy that is.

I do know that GitHub has milestones, which is essentially like releases. I see we've used them before #4395. Maybe something we could consider again.

@jmiranda
Copy link
Member

jmiranda commented Jul 9, 2024

Yeah that's a great idea @drodzewicz and something I hadn't thought of for PRs. @ewaterman milestones is definitely the way to go there. I used them a bit with issues but never really considered it for PRs since we can trace back to the release using the ticket. It would be great to use milestones on PRs but one thing that might be surprisingly difficult is keeping the milestone for a PR in sync with the Jira fixVersion.

@ewaterman
Copy link
Member Author

I'd like to handle release/milestone labelling in a separate PR. I imagine that will require some thought since we're not really utilizing milestones right now. I do like the idea of associating PRs to releases, it'll just require some investigation.

Also for reference, this is what the current PR template looks like:

Screenshot from 2024-07-11 21-02-03

@ewaterman ewaterman merged commit a1da173 into develop Jul 29, 2024
@ewaterman ewaterman deleted the feature/OBPIH-6479-auto-label-pr branch July 29, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: devops Changes or discussions relating to dev ops automation type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants