GithubHelp home page GithubHelp logo

Why not both? about semantic-pull-requests HOT 8 CLOSED

zeke avatar zeke commented on June 11, 2024 2
Why not both?

from semantic-pull-requests.

Comments (8)

CecileRobertMichon avatar CecileRobertMichon commented on June 11, 2024 2

+1 on this.

Our use case is the following: GitHub doesn't let you choose a default squash commit message. Squashing a pull request with one commit would use that commitโ€™s message, but squashing a pull request with more than one commit will use the pull requestโ€™s title for the commit message. We want to make sure that every single external contributor PR in our repo gets merged with a valid squash commit message so checking both would be beneficial for us.

Ideally we would be able to check the squash commit message only (so PR title for multiple commits, commit for single commit).

from semantic-pull-requests.

zeke avatar zeke commented on June 11, 2024 1

Got it. There's an open issue about squashing single-commit PRs: #17

I am pretty busy right now, but would happily accept and ship a PR that addresses this.

from semantic-pull-requests.

nikolasleblanc avatar nikolasleblanc commented on June 11, 2024 1

#46 @clakech I think you meant this PR of yours :)

from semantic-pull-requests.

zeke avatar zeke commented on June 11, 2024 1

Resolved by #46 -- this should be live within a few minutes.

from semantic-pull-requests.

zeke avatar zeke commented on June 11, 2024

๐Ÿ‘‹ Thanks for reporting. You're right about the current behavior. Here's what we have now:

default behavior: validate title or at least one commit is semantic
titleOnly: true: Always validate the PR title, and ignore the commits
commitsOnly: true: Always validate all commits, and ignore the PR title

For what reason would you want to validate both the title and all commits? I'm not against it, but wondering about your use case.

from semantic-pull-requests.

zeke avatar zeke commented on June 11, 2024

@CecileRobertMichon would only allowing "squash merging" on the repo work for your case?

screen shot 2019-02-28 at 8 38 46 am

from semantic-pull-requests.

CecileRobertMichon avatar CecileRobertMichon commented on June 11, 2024

@zeke not exactly. We already only allow squash merging. The issue is that I can't control how many commits are in a pull request and GitHub is inconsistent when squash merging commits. If there is a single commit, the commit message comes from the commit. If there are multiple commits, the commit message comes from the PR title. So checking only the commits or only the title is not sufficient since either may be used at squash time.

from semantic-pull-requests.

clakech avatar clakech commented on June 11, 2024

We would like to have both to have consistency between PR titles and all commits

Here is a first implementation / proposal #42

from semantic-pull-requests.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.