wooga / atlas-github

Gradle plugin to publish artifacts to github
https://wooga.github.io/atlas-github/
Apache License 2.0
1 stars 3 forks source link

releasing a tag as draft does not properly work #18

Closed Vampire closed 6 years ago

Vampire commented 6 years ago

The line release.update().draft(isDraft()).update() corrupts the release tag. Before the line (breakpoint on the line): grafik After the line (stepped over) grafik Which will result in a new tag called untagged-4b7ab7ff233227717a2d on the current master commit instead of on the tag when the release is published without fixing it first.

Vampire commented 6 years ago

And to be more specific, it is the last .update() call that breaks it.

Vampire commented 6 years ago

While switching the draft state should not break the release, actually the whole call is unnecessary here, as the release is already in draft state actually.

Vampire commented 6 years ago

I'd say this is a bug in GitHub actually, if I use HTTPie it is the same. If I patch the release to draft=true it sometimes changes the tag name to untagged-<whatever>. Would you mind releasing a version with release.update().draft(isDraft()).update() replaced by release.update().draft(isDraft()).tag(getTagName()).update() soon, or even better if (release.draft != isDraft()) { release.update().draft(isDraft()).tag(getTagName()).update() }, as an unnecessary call is prevented then.

I made PR #19 that fixes this and while I was at it also #17.

Would be nice if you could release that soon, as I cannot finish the PR I'm preparing with your plugin if this doesn't work properly.

Larusso commented 6 years ago

see https://github.com/wooga/atlas-github/releases/tag/v1.0.1