GitVersion
GitVersion copied to clipboard
[Bug] Failing to detect branch when GitHub action is triggered from a comment on the pull request
Describe the bug Failing to detect branch when GitHub action is triggered from a comment on the pull request
Expected Behavior
It should detect the branch name of the pull request.
Actual Behavior
it always says it's develop (the pr is from a feature branch into develop)
Context
I tried to get the branch name manually, so if there is a way I can provide the correct branch name to gitversion.
Your Environment
- Operating System and version (Windows 10, Ubuntu 18.04): ubuntu-latest
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
Have you tried providing the environment variable Git_Branch?
Unfortunately, this is not our case, we use it to trigger the workflow on the PR branch, I cannot provide it manually.
Ah, I see you're using GitHub Actions. I don't think Git_Branch should do anything to or from then. @arturcic, do you remember how gitversion/execute determines the branch name?
The GitHub action as well as Azure DevOps task is just a wrapper for the global tool.
So the action does nothing to convey the information about which branch is being built to the global tool? If not, we should probably do that, somehow. 🤔
#3020 seems to contradict this, somehow?
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.
This issue was closed because it has been stalled for 30 days with no activity. Thank you for your contributions