bhaalsen / gitmerger Goto Github PK
View Code? Open in Web Editor NEWJira WebHook Receiver to merge Git branches based on Issue Keys
Jira WebHook Receiver to merge Git branches based on Issue Keys
Steps to reproduce:
Since the Merge has no effect, the following amend (GitRepositoryManager.cs
line 133) changes the manually merged commit, and thus fails the push afterwards (even after resetting and re-pulling, since the result is the same there).
GitHub Pull Requests provide a "Revert" button at the end that create another Pull Request that does the inverse. It would probably be nice to provide a link with the issue comment that does this (or rather, shows a HTML form requiring additional confirmation before the revert is attempted). May supersede #2, but may also take longer to implement (especially with failure cases).
This should also add another issue comment with infos about how to get the changes merged correctly. https://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.html describes why this is the case; and why a simple additional merge won't work.
Work is done in ticket JRA-1337
, but for collaboration purposes another branch JRA-1337_review
has been pushed as well. As result, the merger could not decide which one to use (and due to #1 nobody was informed).
Extend the configuration to provide a list of namespaces (that is, for example, review
in review/JRA-1337
or private
in private/JRA-1337
) to be excluded, or even make it a regex (so partial matches without a namespace; such as a _review
or _testing
are possible).
In case there are multiple matching branches, nothing happens. At least not from a Jira perspective, because the merge request is simply ignored.
Instead, it should still add a comment to the Jira issue that the automatic merge could not decide on which one to take.
Jira Comments are limited to 32767 characters, so very verbose merge failures may not make it:
GitMerger.IssueTracking.JiraBasicRestClient: Request to 'http://jira-server/rest/api/2/issue/JRA-1234/comment' apparently failed: The remote server returned an error: (400) Bad Request.
{"errorMessages":[],"errors":{"comment":"The entered text is too long. It exceeds the allowed limit of 32767 characters."}}
This should probably be one or more of those things:
Once the Jira WebHook triggers a merge, fields such as the Upstream Branch or Disable Merge are set in stone; they are not updated after the initial wait is over.
Looks like #1 is broken:
Found 2 branches matching 'JRA-1234', cannot decide which one to merge: GitMerger.RepositoryHandling.GitRepositoryBranch, GitMerger.RepositoryHandling.GitRepositoryBranch
This should show the actual branch name; not the type name.
In case the automerge worked, but the change itself is not correct; provide some manual instructions on what to do (especially with the -m parent-number switch).
One of our older tickets caused a semi-wrong action for the automerge...a different repository with a longer branch name (already merged, but left as remote) has been changed as a result.
Ticket JRA-123 was closed, and branch JRA-1239 was accepted as match. This shouldn't happen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.