From 766bf9ddb01d6b907ee5b275fc070558a3566485 Mon Sep 17 00:00:00 2001 From: Shuhei Kitagawa Date: Sun, 27 Jan 2019 09:32:36 +0900 Subject: [PATCH] Chenge Tag from string to struct --- builds.go | 2 +- tags.go | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tags.go diff --git a/builds.go b/builds.go index 6c59cfc..eddfe6b 100644 --- a/builds.go +++ b/builds.go @@ -51,7 +51,7 @@ type Build struct { // The branch the build is associated with Branch MinimalBranch `json:"branch,omitempty"` // The build's tag - Tag string `json:"tag,omitempty"` + Tag MinimalTag `json:"tag,omitempty"` // The commit the build is associated with Commit MinimalCommit `json:"commit,omitempty"` // List of jobs that are part of the build's matrix diff --git a/tags.go b/tags.go new file mode 100644 index 0000000..bc1f36d --- /dev/null +++ b/tags.go @@ -0,0 +1,17 @@ +// Copyright (c) 2015 Ableton AG, Berlin. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package travis + +// MinimalTag is a minimal representation of a Travis CI tag +type MinimalTag struct { + // Value uniquely identifying a repository of the build belongs to + RepositoryId uint `json:"repository_id"` + // Name of the tag + Name string `json:"name,omitempty"` + // Id of a last build on the branch + LastBuildId uint `json:"last_build_id"` + Metadata +}