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

Pull request template enhancements #5

Merged
merged 8 commits into from
Mar 29, 2023
Merged

Pull request template enhancements #5

merged 8 commits into from
Mar 29, 2023

Conversation

withinfocus
Copy link
Contributor

@withinfocus withinfocus commented Mar 17, 2023

🎟️ Tracking

Internal development.

🚧 Type of change

  • 🎂 Other

📔 Objective

Adds some fun to the template and expands on what info we should collect and where, namely:

  • integrate emojis into the headers and review guidelines for some "pop" and easier communication of concepts visually
  • ask for something to track / connect to the PR
  • mark the change type outside a code block
  • follow a checklist of expectations that each engineer should mark off
  • provide consistent guidelines for reviewers to make intent and communication easier

📋 Code changes

  • .github/PULL_REQUEST_TEMPLATE.md: New template design.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • ❌ (:x:) or ⚠️ (:warning:) for problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@withinfocus withinfocus marked this pull request as ready for review March 17, 2023 18:47
@differsthecat
Copy link
Member

@MGibson1 , I remember a while back you had to remove the checkboxes we used to have like this in our PR templates; do you remember why we had to remove them?

@justindbaur
Copy link
Member

justindbaur commented Mar 17, 2023

@differsthecat It's because the PR will show 3/11 Tasks completed. We found it mildly annoying but it's not the end of the world.

@withinfocus
Copy link
Contributor Author

@differsthecat It's because the PR will show 3/11 Tasks completed. We found it mildly annoying but it's not the end of the world.

Ooh, that's a good point. I do want that for the actual checklist too independent of the change type. Do we feel like we get value out of that at all? Could go with a table and ✔️ or something if we do, but I don't think the code block is the answer.

@differsthecat
Copy link
Member

@differsthecat It's because the PR will show 3/11 Tasks completed. We found it mildly annoying but it's not the end of the world.

Ooh, that's a good point. I do want that for the actual checklist too independent of the change type. Do we feel like we get value out of that at all? Could go with a table and ✔️ or something if we do, but I don't think the code block is the answer.

I do like the checkboxes, especially for the checklist section :p

A table for the Type of Change section is a good alternative. For the checklist section, maybe we update the wording of the items a bit to make them more optional; like If there are any deployment requirements, they have communicated to DevOps and Written new unit and / or integration tests where applicable or something.

@differsthecat
Copy link
Member

@withinfocus How will we extend this for different repos? For example, we have a check in clients about making sure all UI additions follow our accessibility guidelines that we don't need in this base one.

@fedemkr
Copy link
Member

fedemkr commented Mar 17, 2023

About the Type of change, is it worth having all the options shown on all PRs?
I mean we could reduce that to just pick one of the options and delete the other ones and have something like (continuing with emoji fun):

🚧 Type of change

< !-- Pick one and remove the others -->

🐞 Bug fix
🚀 New feature development
♻️ Tech debt (refactoring, code cleanup, dependency upgrades, etc)
⚒️ Build/deploy pipeline (DevOps)
📜 Other

So if we choose the second one, the PR would just stay as:

🚧 Type of change

🚀 New feature development

📔 Objective

...

@withinfocus
Copy link
Contributor Author

@withinfocus How will we extend this for different repos? For example, we have a check in clients about making sure all UI additions follow our accessibility guidelines that we don't need in this base one.

Simple copy and paste. This is our (new to many) template repo, so it's just a starting point. We want what matters to everyone here to get it started, then customize on each "installation".

@withinfocus
Copy link
Contributor Author

@fedemkr I think that could work too, as long as it's easy enough to cut what you need out (which seems like it is).

@mimartin12
Copy link
Contributor

mimartin12 commented Mar 17, 2023

About the Type of change, is it worth having all the options shown on all PRs? I mean we could reduce that to just pick one of the options and delete the other ones and have something like (continuing with emoji fun):

🚧 Type of change

< !-- Pick one and remove the others -->

🐞 Bug fix 🚀 New feature development ♻️ Tech debt (refactoring, code cleanup, dependency upgrades, etc) ⚒️ Build/deploy pipeline (DevOps) 📜 Other

So if we choose the second one, the PR would just stay as:

🚧 Type of change

🚀 New feature development

📔 Objective

...

I was thinking that it was pretty noisy in that section. Maybe even moving it into a dropdown? Example.

@withinfocus
Copy link
Contributor Author

Made a few small changes per the comments to review. I tried out the non-checklist for change types and thought it felt pretty good. I also added a (hidden) comment about the optionality of the checklist vs. rewording each item as I think that will get repetitive.

Comment on lines 41 to 49
## 🦮 Reviewer guidelines

- 👍 (`:+1:`) or similar for great changes
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
- ❓ (`:question:`) for questions
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
- ❌ (`:x:`) or ⚠️ (`:warning:`) for problems or concerns needing attention
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt
- ⛏ (`:pick:`) for minor or nitpick changes
Copy link

Choose a reason for hiding this comment

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

I've been using conventional comments ever since I started at Bitwarden and I think that has been very appreciated. These emojis are very similar so I like the suggestion! Though I probably like conventional comments more 😅

For inspirarion, one specific part of CC that I think has been well received is the modifier non-blocking to a comment (ex: suggestion(non-blocking): make this variable private) which indicates that it's "ok to skip but consider if you have the time"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really enjoy conventional commits and we could even lint on enforcing that but ... that's a big request and with squashing may not even be useful. I hadn't heard of conventional comments before but yes this is going for the same thing but with the power of a visual expression; lots of articles about this being a great way to deliver feedback.

Specific to your "suggestion" I could see 📝 or 🌱 being used.

Copy link

@coroiu coroiu Mar 21, 2023

Choose a reason for hiding this comment

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

Hmm, which category would you say the following example belongs to?

function greet(flag: boolean): string {
  let toReturn;

  if (flag === true) {
    toReturn = 'hello';
  } else if (flag === false) {
    toReturn = 'world';
  } else if (flag == null) {
    throw new Error();
  }

  return toReturn;
}

suggestion: this could be rewritten using guard statements to improve readability. We could also return the values directly instead of having to keep track of an extra variable. See example:

function greet(flag: boolean): string {
  if (flag == null) {
    throw new Error();
  }

  if (flag) {
    return "hello";
  }

  return "world";
}

In conventional comments terms I would probably not assign this an issue since it's still fully functional code, albeit with poor readability. And sometimes these things end up being personal preferences instead of objective improvements. I use suggestion when I don't expect but am prepared for legitimate push back. I wouldn't use nitpick since those I would drop at the first push back.

According to the categories in this PR I'm not sure which I would choose. I don't think this is nitpicking ⛏️ , but it's not really a showstopper ❌ ⚠️ either (these emojis also give me the feeling that the author has done something really wrong, which I wouldn't say is the case here). I'd also rather we fix it now and not add this to future debt, so I wouldn't really say it's a 🌱 or ♻️ either.

I think I would end up using ⚠️ , but I am trying to make a friendly suggestion which ⚠️ doesn't really feel like.

It feels hard to explain in words since it feels like it comes down to nuances between words and emojis. Am I making sense here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally making sense, and I will keep thinking about this one too. Some other sources I found for emoji usage:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@coroiu after a little more thought I just pushed a change that incorporates one of the above sites' suggestion on 🎨 for what you're describing. Lemme know what you think.

Copy link

Choose a reason for hiding this comment

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

I think that's a great solution! Thanks for taking the time to decipher what felt like over-thinking on my part 😅

@withinfocus
Copy link
Contributor Author

For anyone subscribed and reviewing, feel free to commit to this branch or suggest alternatives, even if we revert!

@eliykat
Copy link
Member

eliykat commented Mar 23, 2023

I like the Reminders section, thanks @withinfocus !

coroiu
coroiu previously approved these changes Mar 27, 2023
Comment on lines 41 to 49
## 🦮 Reviewer guidelines

- 👍 (`:+1:`) or similar for great changes
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
- ❓ (`:question:`) for questions
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
- ❌ (`:x:`) or ⚠️ (`:warning:`) for problems or concerns needing attention
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt
- ⛏ (`:pick:`) for minor or nitpick changes
Copy link

Choose a reason for hiding this comment

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

I think that's a great solution! Thanks for taking the time to decipher what felt like over-thinking on my part 😅

@withinfocus
Copy link
Contributor Author

@fedemkr @differsthecat @eliykat @mimartin12 @justindbaur any final feelings on this?

differsthecat
differsthecat previously approved these changes Mar 28, 2023
Copy link
Member

@differsthecat differsthecat left a comment

Choose a reason for hiding this comment

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

Looks great @withinfocus !

fedemkr
fedemkr previously approved these changes Mar 28, 2023
@withinfocus withinfocus dismissed stale reviews from fedemkr, differsthecat, and coroiu via 1f87c4f March 28, 2023 20:55
@withinfocus withinfocus requested a review from fedemkr March 28, 2023 20:56
@withinfocus
Copy link
Contributor Author

@fedemkr I'll let you give the final 👍!

Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

All good 😄 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants