Closed HeshamMeneisi closed 4 years ago
@HeshamMeneisi thanks for the feedback, very interesting case. We'll try to fix it in the next sprint.
Thanks for the prompt response! I actually experimented a little with the code after posting that and it seemed quite easy to solve the problem. I will create a PR so you could review the changes.
@antongolub @oljekechoro I introduced these two options in PR #83, please take a look when you have time!
Fixed in #83, released in 1.16.0
Problem
I'm using this plugin with my main GitHub page. The main GitHub page requires that the distribution is on master and thus I have to store the codebase on a different branch.
Now while I can choose the target branch, I cannot choose the source branch. Especially when using this in GitHub actions where the current branch is already checked out, the pullTags promise then fails with the following error:
This makes sense as the master branch containing the distribution and the current branch (codebase - FETCH_HEAD) are completely unrelated.
Proposed Solution
currentBranch
option that defaults to master.So instead of executing
git pull --tags {{repo}}
we would executegit pull --tags {{repo}} {{currentBranch}}
pullBranch
option that defaults to true (to avoid redundant actions when already checked out in GitHub actions without breaking current behaviour)