zeke / semantic-pull-requests

:robot: Let the robots take care of the semantic versioning
https://github.com/apps/semantic-pull-requests
Apache License 2.0
1.24k stars 122 forks source link

fix: scope validation #126

Closed cenobitedk closed 3 years ago

cenobitedk commented 3 years ago

In #124 the test for scope validation was broken. The code was testing the commit header data, but was given the whole commit when validating semantic message.

This should fix #125

cenobitedk commented 3 years ago

@zeke Why are test cases not running on PR's?

jaimesuncin-telus commented 3 years ago

@zeke Why are test cases not running on PR's?

The workflow only runs on push

https://github.com/zeke/semantic-pull-requests/blob/a0321275095386bbd84bd256f075dfc1cd0f4901/.github/workflows/ci.yml#L6

jaimesuncin-telus commented 3 years ago

Change it to:

on: [push, pull_request]

It will make to run the workflow on every push and pull request

zeke commented 3 years ago

Thanks for the fix, but it does include a lot of unrelated style changes.

I'm going to close this in favor of a smaller fix: https://github.com/zeke/semantic-pull-requests/pull/129

cenobitedk commented 3 years ago

The unrelated styles changes is because I have prettier set up and I didn't it expect it to be a problem. But the changes are also due to the included lint script which runs with --fix. This should naturally have run on the original PR before it was merged.

stephenmathieson commented 3 years ago

@zeke #129 doesn't fix the problem with the service, it just sets up CI. If the style changes are removed from this PR, can we reopen and get it merged?

I see, #128 fixed the issue. Never mind and thank you! ❤️

zeke commented 3 years ago

This should naturally have run on the original PR before it was merged.

Gotcha @cenobitedk thanks for the clarification. 👍🏼

Now that tests are set up to run on PRs from forks, we should not see that problem again.