Closed gevalter closed 4 years ago
Currently it is a wanted behavior that the full project is rebuild when a tag is specified.
A tag is nothing else than a git commit deep down. It should be possible to compare to tags, just like to commits. But i can not say for sure that we even want this, currently its not required and safes us some complexity.
ok but you should know that some drone plugins like github-release do not work with commit events, only tags events are supported. this means that this plugin breaks one of drone supported features, there are many projects out there relying on the ability to produce an artifact on a tag.
On a Tag event all files should be rebuild. Thats whats currently expected.
Hey man, after a long day of fighting with drone to figure out why tags don't work with an 404 not found error - i discovered that there is a problem getting events related to tags with this plugin.
In scm.go you can see that when event comes with a ref of refs/tags/ it goes to the else which in this case is comparing the branch with 00000000 then it fails because it tries to go to google-go-github function of branch listfiles.
I searched google-go-github for a tag related event handling but did not find any... instead there is only a get asset of a release which includes all the code...
is there a way of telling the plugin that whenever the ref is refs/tags/ it should go back to how drone natively discovers the changes or you thing it is possible to implement this in scm.go with this module https://github.com/google/go-github/blob/e4b511744f5bbb020d00e172a284468137d4e5fc/github/repos_releases.go
i can help by PR changes but i need a direction