filter by drafts in the check step

The user now opts-in to getting final or draft releases. Default
behaviour is final releases.

NOTE: There is also strict filtering on only allowing semver supported tags.

Signed-off-by: David Jahn <david.a.jahn@gmail.com>
This commit is contained in:
JT Archie
2015-10-22 12:27:52 -04:00
committed by David Jahn
parent e3a3a53dba
commit 7331e0a7ad
13 changed files with 329 additions and 54 deletions

View File

@@ -13,18 +13,25 @@ func TestGithubReleaseResource(t *testing.T) {
RunSpecs(t, "Github Release Resource Suite")
}
func newRepositoryRelease(version string) github.RepositoryRelease {
draft := false
func newRepositoryRelease(id int, version string) github.RepositoryRelease {
return github.RepositoryRelease{
TagName: github.String(version),
Draft: &draft,
Draft: github.Bool(false),
ID: github.Int(id),
}
}
func newDraftRepositoryRelease(version string) github.RepositoryRelease {
draft := true
func newDraftRepositoryRelease(id int, version string) github.RepositoryRelease {
return github.RepositoryRelease{
TagName: github.String(version),
Draft: &draft,
Draft: github.Bool(true),
ID: github.Int(id),
}
}
func newDraftWithNilTagRepositoryRelease(id int) github.RepositoryRelease {
return github.RepositoryRelease{
Draft: github.Bool(true),
ID: github.Int(id),
}
}