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

fix: Single commit validation does not factor in merge commits [#108] #127

Merged
merged 6 commits into from
Oct 26, 2021
Merged

fix: Single commit validation does not factor in merge commits [#108] #127

merged 6 commits into from
Oct 26, 2021

Conversation

julianpoy
Copy link
Contributor

Closes #108

With a recent change, GitHub no longer factors in merge commits added by the "update branch" button into whether to use the PR title. If a dev submits a PR with a single commit, then presses the "update branch" button, action-semantic-pull-request will allow the branch to be merged, however GitHub will still use the commit title rather than the PR title.

Closes #108

With a recent change, GitHub no longer factors in merge commits added by the "update branch" button into whether to use the PR title. If a dev submits a PR with a single commit, then presses the "update branch" button, action-semantic-pull-request will allow the branch to be merged, however GitHub will still use the commit title rather than the PR title.
@amannn
Copy link
Owner

amannn commented Oct 25, 2021

Thanks a lot for looking into this! Do you think you could fix the stylistic lint error (yarn lint --fix) and possibly add a comment to the updated lines to explain the situation?

Many thanks!

@julianpoy
Copy link
Contributor Author

@amannn Done! 😄

src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
@amannn amannn merged commit 1b347f7 into amannn:master Oct 26, 2021
@github-actions
Copy link

🎉 This PR is included in version 3.4.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

amannn added a commit that referenced this pull request Oct 26, 2021
@amannn
Copy link
Owner

amannn commented Oct 26, 2021

@julianpoy Unfortunately this PR has caused a bug (#128) and I had to revert this temporarily.

I think the access to commit.message is invalid, if you look below we were accessing the message like commits[0].commit.message before.

Would you be interested in creating another PR with the change and the fix? The contributors guide has instructions about how you can test this action. Due to the nature of this action we have to rely a bit on manual testing unfortunately and I overlooked to do it.

@julianpoy
Copy link
Contributor Author

@amannn oh wow, so sorry about that!

Makes sense, will try the fix again following that guide.

Unsure why the commit.message would be invalid for commits mapped. Perhaps merge commits don't include a message field? Oh well, I'll look into it.

@mrchief
Copy link

mrchief commented Oct 26, 2021

Can confirm - I'm getting Error: Cannot read property 'startsWith' of undefined

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.

Merge commits bypass the checks
3 participants