-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement logic necessary to inject Issue-Id into commit message #25
Comments
This issue request for a fix is outside the intended scope of the Github2Gerrit (G2G) workflow. G2G functions as a simple pass-through, forwarding developer (or Dependabot) changes directly to the configured Gerrit repository without modifications. To address the Issue-Id: requirement, consider these options:
|
@askb I understand your point about this being outside the scope of your intended work. I'm not sure either of the suggestions above will be acceptable to solve the current problem. |
Issue ID checking in Gerrit is done during the receive phase of the change going to Gerrit it is not bypassable if the Gerrit is configured to require one.
Prolog rules are no longer a thing in the version of Gerrit that we're using. If a rule exists, it's a grandfathered thing, but at this point we don't have any Gerrit system that has prolog rules. Even if we did, see my comment on your option 1, it's not something that is review time, it's on change instantiation time. So, no, this is not actually outside of the scope of G2G, it's a use case that G2G needs to handle in some way if we are to ever allow our projects to use Dependabot or pre-commit.ci to raise changes automatically against our Gerrit based projects.
This can't be a secondary workflow given the mechanisms in witch G2G is striving to operate. It would fall down on multi-commit PRs along with any other PRs that are effectively being re-opened. Here's what I envision we would have:
|
As per the dependabot change here:
onap/portal-ng-bff#3
The Github2Gerrit workflow run failed on this PR:
https://github.com/onap/portal-ng-bff/actions/runs/11481797408/job/32152835438?pr=3
This is due to the project Gerrit servers requiring all commit messages to contain an Issue-Id linked to a valid ticket in JIRA. Having discussed with Andrew, bypassing this check is NOT an option. We will therefore need to implement the logic and code necessary to enumerate the source of the PR, and populate the appropriate JIRA Issue-Id in some way. Perhaps a lookup table of some kind, stashed as JSON or similar in a GitHub variable for each project? The system also needs to be able to lookup more than one source, as Dependabot will not be the only external PRs generated in Github.
The text was updated successfully, but these errors were encountered: