common-custom-user-data-gradle-plugin
common-custom-user-data-gradle-plugin copied to clipboard
Inconsistencies in Custom Values Reporting between Jenkins and GitHub Actions
Hi 👋
We are currently migrating from Jenkins to GHA, and by comparing the scans produced by this plugin and we think it's not supporting correctly Github Actions.
We have observed some inconsistencies on its custom values as you can see below .
The main problems are :
- Git branch is reported always as HEAD, when we'd expect to have the git branch name
- The git commit on PRs is reporting the virtual merge commit instead of the HEAD commit of the PR (this also was happening on jenkins)
- We don't see the PR number in any custom value.
Proposal Fixes :
Follow the same pattern applied in getGitBranchName function, and use CI environment variables to report git branch / commit / PR number / repository and fall back to the git command when it can't be read from it.
We'll only add the logic for GHA, but anyone else can support other CIs later.
Thanks for reporting this! We'll have a look.
As far as we understand though, there is no simple way to get the PR number from a GHA build. If you find a way, please let us know
Related to #74