-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Display conflict-free merge messages for pull requests #15773
Display conflict-free merge messages for pull requests #15773
Conversation
Repositories using external issue tracker tend to use numeric issues in commits. To prevent conflicts during issue reference parsing or inside commit hooks, this change respects these configuration and uses the ! character to refer to pull requests in merge commit messages. For repositories using squash merges, this was already handled. Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com>
@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf I suspect that this needs a second check to work for your situation? |
Thanks for bringing me in! |
Co-authored-by: zeripath <art27@cantab.net>
Actually @wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf you wouldn't use this - so I think you're fine. Sorry for wasting your time. |
yeah, no worries, now I see I'm not affected since I disable PRs for the mirrors and here it's Still, I have one interesting observation. |
Codecov Report
@@ Coverage Diff @@
## main #15773 +/- ##
==========================================
- Coverage 43.99% 43.97% -0.02%
==========================================
Files 678 678
Lines 82016 82022 +6
==========================================
- Hits 36081 36070 -11
- Misses 40065 40077 +12
- Partials 5870 5875 +5
Continue to review full report at Codecov.
|
Backport go-gitea#15773 Repositories using external issue tracker tend to use numeric issues in commits. To prevent conflicts during issue reference parsing or inside commit hooks, this change respects these configuration and uses the ! character to refer to pull requests in merge commit messages. For repositories using squash merges, this was already handled. Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
Backport #15773 Repositories using external issue tracker tend to use numeric issues in commits. To prevent conflicts during issue reference parsing or inside commit hooks, this change respects these configuration and uses the ! character to refer to pull requests in merge commit messages. For repositories using squash merges, this was already handled. Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Steven <61625851+justusbunsi@users.noreply.github.com>
Repositories using external issue tracker tend to use numeric issues in commits. To prevent conflicts during issue reference parsing or inside commit hooks, this change respects these configuration and uses the ! character to refer to pull requests in merge commit messages. For repositories using squash merges, this was already handled. Signed-off-by: JustusBunsi <61625851+justusbunsi@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
External issue tracker often use a syntax like
#1337
as item references in commits. When you handle pull requests with the default "merge commit" message, the very pull request will be referenced with#
as well. Gitea itself can handle this situation and is able to identify both item and pull request reference when parsing the commit message.If other external components (e.g.) push hooks ensure commits to only contain valid item references by looking for
#
occurrences, such commits would be rejected due to a non-valid issue reference.Regarding the documentation, Gitea is able to use
#
and!
for item references for these use cases. This was handled only for squash mergesThese changes take an external issue tracker into account when rendering merge commit messages. In such a case the documented
!
will be used for item references in merge commits.Signed-off-by: Steven Kriegler 61625851+justusbunsi@users.noreply.github.com