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

Automate some code review comments #4912

Open
gravitystorm opened this issue Jun 19, 2024 · 2 comments
Open

Automate some code review comments #4912

gravitystorm opened this issue Jun 19, 2024 · 2 comments
Labels
dx Developer Experience

Comments

@gravitystorm
Copy link
Collaborator

There's a few common code review comments that could be automated (or in the meantime, community members are welcome to jump in and help out the maintainers with these reviews!):

  • Any changes to locale files, other than en.yml, should be flagged and the PR amended
  • Any PRs that have a merge commit should be flagged and the PR amended

In both cases, the response is more-or-less the same content each time, usually with a link to the right place in our documentation.

We could automate this, which would bring a few benefits, namely

  • Faster feedback cycle. Contributors would get the message straight away, while they might still be working on their PR, and not several hours/days later.
  • Less work for maintainers - we're overstretched already, so it's one less thing to take care of.
  • More polished responses - sometimes we're a bit pressed for time, or forget the link to the documentation, or similar.
  • More support for maintainers - like linters and tests, it could highlight things we might miss.

I've seen other projects using Danger for this, since it's able to access the state of the PR in git, i.e. it can reason about the changes, not just the end state (otherwise we'd use linters etc for that).

https://danger.systems/ruby/

Anyone fancy implementing these rules? Or any reasons not to?

@gravitystorm gravitystorm added the dx Developer Experience label Jun 19, 2024
@rkoeze
Copy link

rkoeze commented Jun 21, 2024

This seems reasonable. One alternative could be to use a Github PR template with a checklist of requirements. With that said I think there are benefits to automatically enforcing certain things.

(I also wonder if using a template to ensure consistent PR descriptions would make life easier for the maintainers. I’m happy to put together a draft PR if that would be helpful, but I don't want to steer this conversation off-topic!)

@nenad-vujicic
Copy link
Contributor

This seems reasonable. One alternative could be to use a Github PR template with a checklist of requirements. With that said I think there are benefits to automatically enforcing certain things.

Or perhaps a combination of these two? Using templates for enforcing better (standardized) descriptions and e.g. Danger for automatized labeling of PRs?

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

No branches or pull requests

3 participants