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
Improve MergeCommit rule to focus on remote and non-base branches #6
Labels
bug
Something isn't working
Comments
tombruijn
added a commit
that referenced
this issue
Jul 15, 2021
It's difficult to determine what type of merge the merge commit is about. I want to warn about local branch merges into feature branches, not about merges into the repository's main branch. Since Git has no config for a "main" branch for a local repository this is difficult to determine. For this reason I'm narrowing the commits this rule triggers on to only merges from remotes. I do want to trigger on local merges too in the future, but those commits will be ignored for now. The tracking issue for this is #6. ## Background I notice two kind of merge commits being created by Git. This subject is being created when I merge a local branch into the repository's local "main" or "master" branches. > Merge branch 'branch' The following subject is created when a local branch is into another local branch (that is not "main" or "master"). > Merge branch 'branch' into other Perhaps this gives some hint for the future about how to distinguish between the different types of merges, but I can't rely on it now, in case a repository uses a different type of "main" branch name like "trunk".
tombruijn
added a commit
that referenced
this issue
Jul 15, 2021
It's difficult to determine what type of merge the merge commit is about. I want to warn about local branch merges into feature branches, not about merges into the repository's main branch. Since Git has no config for a "main" branch for a local repository this is difficult to determine. For this reason I'm narrowing the commits this rule triggers on to only merges from remotes. I do want to trigger on local merges too in the future, but those commits will be ignored for now. The tracking issue for this is #6. ## Background I notice two kind of merge commits being created by Git. This subject is being created when I merge a local branch into the repository's local "main" or "master" branches. > Merge branch 'branch' The following subject is created when a local branch is into another local branch (that is not "main" or "master"). > Merge branch 'branch' into other Perhaps this gives some hint for the future about how to distinguish between the different types of merges, but I can't rely on it now, in case a repository uses a different type of "main" branch name like "trunk".
tombruijn
added a commit
that referenced
this issue
Jul 15, 2021
It's difficult to determine what type of merge the merge commit is about. I want to warn about local branch merges into feature branches, not about merges into the repository's main branch. Since Git has no config for a "main" branch for a local repository this is difficult to determine. For this reason I'm narrowing the commits this rule triggers on to only merges from remotes. I do want to trigger on local merges too in the future, but those commits will be ignored for now. The tracking issue for this is #6. ## Background I notice two kind of merge commits being created by Git. This subject is being created when I merge a local branch into the repository's local "main" or "master" branches. > Merge branch 'branch' The following subject is created when a local branch is into another local branch (that is not "main" or "master"). > Merge branch 'branch' into other Perhaps this gives some hint for the future about how to distinguish between the different types of merges, but I can't rely on it now, in case a repository uses a different type of "main" branch name like "trunk".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This build should not have failed for merging
develop
into themain
branch: https://appsignal.semaphoreci.com/jobs/a4882761-bd18-4b28-8b1e-afbb13ce7d05Can I add some accepted branch names that are accepted? Can I find out what is the base branch? Or should the rule be limited now on merge commits made by
git pull
The text was updated successfully, but these errors were encountered: