You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently employ a pre-receive hook to check commit messages for mentions of a mandatory issue tracker id and otherwise reject commits.
The mandatory form we're using is: "Issue #{issueid}: {message}".
I'm going to show off two places where this bites (or will bite) us, there might however be a few more around Gitea.
Merge messages
This is one place where this is a bit annoying but can be worked around:
See that the title of the PR is already formed into a commit message which would be valid, so we can copy paste it into the merge box.
However, if someone messes this up (which is easy, e.g. when facing the PR workflow the first few times), we get an invalid message.
In this place I could think of a simple template as in {{ .pull.title }} (pseudocode).
Update Branch
This is pretty new, that's the reason why I'm using the RC :-)
If I use the new "Update branch" button (which I can't seem to disable) I'm not prompted for a message:
Gitea is creating an automatic merge message which is invalid to our expected commit messages:
In this case, a template I would use is in the form of Issue #{{.head.branch_name}}: Merge branch '{{.base.branch}}' into {{.head.branch_name}} (also Pseudocode)
While the branch protection for outdated branches (against their base) and the mention of it in the PR will be super helpful and a welcoming addition for us, the Update branch button (which can't be disabled by option) is dangerous in our case :-)
The text was updated successfully, but these errors were encountered:
[x]
):Description
We currently employ a pre-receive hook to check commit messages for mentions of a mandatory issue tracker id and otherwise reject commits.
The mandatory form we're using is: "Issue #{issueid}: {message}".
I'm going to show off two places where this bites (or will bite) us, there might however be a few more around Gitea.
Merge messages
This is one place where this is a bit annoying but can be worked around:
See that the title of the PR is already formed into a commit message which would be valid, so we can copy paste it into the merge box.
However, if someone messes this up (which is easy, e.g. when facing the PR workflow the first few times), we get an invalid message.
In this place I could think of a simple template as in
{{ .pull.title }}
(pseudocode).Update Branch
This is pretty new, that's the reason why I'm using the RC :-)
If I use the new "Update branch" button (which I can't seem to disable) I'm not prompted for a message:
Gitea is creating an automatic merge message which is invalid to our expected commit messages:
In this case, a template I would use is in the form of
Issue #{{.head.branch_name}}: Merge branch '{{.base.branch}}' into {{.head.branch_name}}
(also Pseudocode)This place in particular was mentioned in the discussion of the Update branch button
While the branch protection for outdated branches (against their base) and the mention of it in the PR will be super helpful and a welcoming addition for us, the
Update branch
button (which can't be disabled by option) is dangerous in our case :-)The text was updated successfully, but these errors were encountered: