Skip to content

Implement logic necessary to inject Issue-Id into commit message #25

@ModeSevenIndustrialSolutions

Description

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.

git review --yes -t GH-portal-ng-bff-3 --reviewers releng+onap-gh2gerrit@linuxfoundation.org
git review .... inprogress
remote: 
remote: Processing changes: refs: 1        
remote: Processing changes: refs: 1        
remote: Processing changes: refs: 1, done            
remote: commit ec96f6f: warning: subject >50 characters; use shorter first paragraph        
remote: commit ec96f6f: Missing issue-id in commit message        
remote: Commit ec96f6f33397dee73769a54c647e7c7ce7a1ba3f not associated to any issue        
remote: 
remote: Hint: insert one or more issue-id anywhere in the commit message.        
remote:       Issue-ids are strings matching Issue-ID: ([A-Z][A-Z0-9]{1,9}-\d+)        
remote:       and are pointing to existing tickets on its-jira Issue-Tracker        
To ssh://gerrit.onap.org:29418/portal-ng/bff
 ! [remote rejected] HEAD -> refs/for/master%topic=GH-portal-ng-bff-3,r=releng+onap-gh2gerrit@linuxfoundation.org (commit ec96f6f: Missing issue-id in commit message)
error: failed to push some refs to 'ssh://gerrit.onap.org:29418/portal-ng/bff'
Error: Process completed with exit code 1.
##[debug]Finishing: Submit the change to Gerrit repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions