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] #130

Closed
wants to merge 1 commit into from

Conversation

julianpoy
Copy link
Contributor

@julianpoy julianpoy commented Oct 26, 2021

See julianpoy#2 for validation that this works.

Continuation of #127

The problem with the original PR was that GitHub API returns a list of commits each with a property commit inside. When mapping over commits => commit, I forgot to add an additional chain for commits => commit.commit.

I also noticed that validatePrTitle should check the nonMergeCommit that we found in the case that there is, in fact, only one commit, rather than any one of the commits in case the first commit returned is a merge commit (for some strange reason).

Lastly, I noticed that the test workflows included in this repository (the one titled current branch) don't use any of the additional options that this repo has to offer, such as the validateSingleCommit option. I would recommend that the current branch workflow test for this repository either include these options, or that there be multiple workflows defined - one for each option.

@julianpoy julianpoy closed this Oct 26, 2021
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.

1 participant