-
Notifications
You must be signed in to change notification settings - Fork 358
fix: check_commit_msg used for PRs titles only #260
Conversation
@kevholmes Actually, it would be great to give the contributor an indication before submitting a PR. It's ok that it runs on a maybe you can use
to achieve that WDYT? |
@romanlab I like the idea of adding the python script as a local pre-commit hook, that way the contributor could see the issue before they ever make a commit. I'd say it's a pretty minute difference between Also by default with on: |
@kevholmes That's a valid point. But looking at the event structure for a |
|
That's fine, i see the |
Ahh ok, I see what you're saying @romanlab regarding the python script possibly not working with this approach. It seems like we really want to run something that examines the GH PR's |
Maybe using something like this to review the PR titles? |
We prefer to not have external dependencies on projects with almost no community. |
@romanlab How about this? I've refactored the python script and workflow to handle PR title checking instead of commit message checking. This has a more narrow scope and I think it meets the team's criteria. I have added some additional error handling to the python script as I noticed issues with errors when attempting to parse a I used some sample output from a test PR in my fork of datree's repo to test the Python script, here's the sample json. I am able to edit the PR title and verify the check will re-run at that time, and correctly passes or then fails depending on what I changed my PR title to. |
I've got some sample code running in my public fork if you'd like to review it there: kevholmes#2 |
This resolves #258. When reviewing the original issue #205 it sounds like this was only supposed to run on
pull_request
events. My fix will ensure that this only runs when contributors submit a PR to the datree repo.