Skip to content

Commit

Permalink
enhance: adding a branch field to scheduled builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Aug 22, 2023
1 parent 7dc577f commit 6828ded
Show file tree
Hide file tree
Showing 26 changed files with 63 additions and 40 deletions.
2 changes: 1 addition & 1 deletion api/build/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
// PublishToQueue is a helper function that creates
// a build item and publishes it to the queue.
func PublishToQueue(ctx context.Context, queue queue.Service, db database.Interface, p *pipeline.Build, b *library.Build, r *library.Repo, u *library.User) {
item := types.ToItem(p, b, r, u)
item := types.ToItem(b, r, u)

logrus.Infof("Converting queue item to json for build %d for %s", b.GetNumber(), r.GetFullName())

Expand Down
1 change: 1 addition & 0 deletions api/schedule/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func CreateSchedule(c *gin.Context) {
s.SetCreatedAt(time.Now().UTC().Unix())
s.SetUpdatedAt(time.Now().UTC().Unix())
s.SetUpdatedBy(u.GetName())
s.SetBranch(input.GetBranch())

// set the active field based off the input provided
if input.Active == nil {
Expand Down
1 change: 1 addition & 0 deletions api/schedule/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func UpdateSchedule(c *gin.Context) {

// set the updated by field using claims
s.SetUpdatedBy(u.GetName())
s.SetBranch(input.GetBranch())

// update the schedule within the database
s, err = database.FromContext(c).UpdateSchedule(ctx, s, true)
Expand Down
4 changes: 2 additions & 2 deletions cmd/vela-server/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func processSchedule(ctx context.Context, s *library.Schedule, compiler compiler
}

// send API call to capture the commit sha for the branch
_, commit, err := scm.GetBranch(u, r)
_, commit, err := scm.GetBranch(u, r, s.GetBranch())
if err != nil {
return fmt.Errorf("failed to get commit for repo %s on %s branch: %w", r.GetFullName(), r.GetBranch(), err)
}
Expand All @@ -193,7 +193,7 @@ func processSchedule(ctx context.Context, s *library.Schedule, compiler compiler

b := new(library.Build)
b.SetAuthor(s.GetCreatedBy())
b.SetBranch(r.GetBranch())
b.SetBranch(s.GetBranch())
b.SetClone(r.GetClone())
b.SetCommit(commit)
b.SetDeploy(s.GetName())
Expand Down
2 changes: 2 additions & 0 deletions database/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2052,6 +2052,7 @@ func newResources() *Resources {
scheduleOne.SetUpdatedAt(time.Now().Add(time.Hour * 1).UTC().Unix())
scheduleOne.SetUpdatedBy("octokitty")
scheduleOne.SetScheduledAt(time.Now().Add(time.Hour * 2).UTC().Unix())
scheduleOne.SetBranch("main")

scheduleTwo := new(library.Schedule)
scheduleTwo.SetID(2)
Expand All @@ -2064,6 +2065,7 @@ func newResources() *Resources {
scheduleTwo.SetUpdatedAt(time.Now().Add(time.Hour * 1).UTC().Unix())
scheduleTwo.SetUpdatedBy("octokitty")
scheduleTwo.SetScheduledAt(time.Now().Add(time.Hour * 2).UTC().Unix())
scheduleTwo.SetBranch("main")

secretOrg := new(library.Secret)
secretOrg.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/schedule/count_active_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestSchedule_Engine_CountActiveSchedules(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -34,6 +35,7 @@ func TestSchedule_Engine_CountActiveSchedules(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
2 changes: 2 additions & 0 deletions database/schedule/count_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestSchedule_Engine_CountSchedulesForRepo(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -38,6 +39,7 @@ func TestSchedule_Engine_CountSchedulesForRepo(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
2 changes: 2 additions & 0 deletions database/schedule/count_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestSchedule_Engine_CountSchedules(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -32,6 +33,7 @@ func TestSchedule_Engine_CountSchedules(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
7 changes: 4 additions & 3 deletions database/schedule/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestSchedule_Engine_CreateSchedule(t *testing.T) {
_schedule.SetCreatedBy("user1")
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand All @@ -31,9 +32,9 @@ func TestSchedule_Engine_CreateSchedule(t *testing.T) {

// ensure the mock expects the query
_mock.ExpectQuery(`INSERT INTO "schedules"
("repo_id","active","name","entry","created_at","created_by","updated_at","updated_by","scheduled_at","id")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) RETURNING "id"`).
WithArgs(1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, 1).
("repo_id","active","name","entry","created_at","created_by","updated_at","updated_by","scheduled_at","branch","id")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11) RETURNING "id"`).
WithArgs(1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main", 1).
WillReturnRows(_rows)

_sqlite := testSqlite(t)
Expand Down
1 change: 1 addition & 0 deletions database/schedule/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func TestSchedule_Engine_DeleteSchedule(t *testing.T) {
_schedule.SetCreatedBy("user1")
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
5 changes: 3 additions & 2 deletions database/schedule/get_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ func TestSchedule_Engine_GetScheduleForRepo(t *testing.T) {
_schedule.SetCreatedBy("user1")
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()

// create expected result in mock
_rows := sqlmock.NewRows(
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at"},
).AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil)
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at", "branch"},
).AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main")

// ensure the mock expects the query
_mock.ExpectQuery(`SELECT * FROM "schedules" WHERE repo_id = $1 AND name = $2 LIMIT 1`).WithArgs(1, "nightly").WillReturnRows(_rows)
Expand Down
5 changes: 3 additions & 2 deletions database/schedule/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ func TestSchedule_Engine_GetSchedule(t *testing.T) {
_schedule.SetCreatedBy("user1")
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()

// create expected result in mock
_rows := sqlmock.NewRows(
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at"},
).AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil)
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at", "branch"},
).AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main")

// ensure the mock expects the query
_mock.ExpectQuery(`SELECT * FROM "schedules" WHERE id = $1 LIMIT 1`).WithArgs(1).WillReturnRows(_rows)
Expand Down
6 changes: 4 additions & 2 deletions database/schedule/list_active_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func TestSchedule_Engine_ListActiveSchedules(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -35,6 +36,7 @@ func TestSchedule_Engine_ListActiveSchedules(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand All @@ -47,8 +49,8 @@ func TestSchedule_Engine_ListActiveSchedules(t *testing.T) {

// create expected result in mock
_rows = sqlmock.NewRows(
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at"}).
AddRow(1, 1, true, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil)
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at", "branch"}).
AddRow(1, 1, true, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main")

// ensure the mock expects the query
_mock.ExpectQuery(`SELECT * FROM "schedules" WHERE active = $1`).WithArgs(true).WillReturnRows(_rows)
Expand Down
6 changes: 4 additions & 2 deletions database/schedule/list_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func TestSchedule_Engine_ListSchedulesForRepo(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -39,6 +40,7 @@ func TestSchedule_Engine_ListSchedulesForRepo(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand All @@ -51,8 +53,8 @@ func TestSchedule_Engine_ListSchedulesForRepo(t *testing.T) {

// create expected result in mock
_rows = sqlmock.NewRows(
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at"}).
AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil)
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at", "branch"}).
AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main")

// ensure the mock expects the query
_mock.ExpectQuery(`SELECT * FROM "schedules" WHERE repo_id = $1 ORDER BY id DESC LIMIT 10`).WithArgs(1).WillReturnRows(_rows)
Expand Down
8 changes: 5 additions & 3 deletions database/schedule/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestSchedule_Engine_ListSchedules(t *testing.T) {
_scheduleOne.SetCreatedBy("user1")
_scheduleOne.SetUpdatedAt(1)
_scheduleOne.SetUpdatedBy("user2")
_scheduleOne.SetBranch("main")

_scheduleTwo := testSchedule()
_scheduleTwo.SetID(2)
Expand All @@ -33,6 +34,7 @@ func TestSchedule_Engine_ListSchedules(t *testing.T) {
_scheduleTwo.SetCreatedBy("user1")
_scheduleTwo.SetUpdatedAt(1)
_scheduleTwo.SetUpdatedBy("user2")
_scheduleTwo.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand All @@ -45,9 +47,9 @@ func TestSchedule_Engine_ListSchedules(t *testing.T) {

// create expected result in mock
_rows = sqlmock.NewRows(
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at"}).
AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil).
AddRow(2, 2, false, "hourly", "0 * * * *", 1, "user1", 1, "user2", nil)
[]string{"id", "repo_id", "active", "name", "entry", "created_at", "created_by", "updated_at", "updated_by", "scheduled_at", "branch"}).
AddRow(1, 1, false, "nightly", "0 0 * * *", 1, "user1", 1, "user2", nil, "main").
AddRow(2, 2, false, "hourly", "0 * * * *", 1, "user1", 1, "user2", nil, "main")

// ensure the mock expects the query
_mock.ExpectQuery(`SELECT * FROM "schedules"`).WillReturnRows(_rows)
Expand Down
1 change: 1 addition & 0 deletions database/schedule/schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func testSchedule() *library.Schedule {
UpdatedAt: new(int64),
UpdatedBy: new(string),
ScheduledAt: new(int64),
Branch: new(string),
}
}

Expand Down
3 changes: 3 additions & 0 deletions database/schedule/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package schedule

import (
"context"

"github.com/go-vela/types/constants"
)

Expand All @@ -25,6 +26,7 @@ schedules (
updated_at INTEGER,
updated_by VARCHAR(250),
scheduled_at INTEGER,
branch VARCHAR(250),
UNIQUE(repo_id, name)
);
`
Expand All @@ -44,6 +46,7 @@ schedules (
updated_at INTEGER,
updated_by TEXT,
scheduled_at INTEGER,
branch TEXT,
UNIQUE(repo_id, name)
);
`
Expand Down
8 changes: 5 additions & 3 deletions database/schedule/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ func TestSchedule_Engine_UpdateSchedule_Config(t *testing.T) {
_schedule.SetCreatedBy("user1")
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()

// ensure the mock expects the query
_mock.ExpectExec(`UPDATE "schedules"
SET "repo_id"=$1,"active"=$2,"name"=$3,"entry"=$4,"created_at"=$5,"created_by"=$6,"updated_at"=$7,"updated_by"=$8,"scheduled_at"=$9
WHERE "id" = $10`).
WithArgs(1, false, "nightly", "0 0 * * *", 1, "user1", NowTimestamp{}, "user2", nil, 1).
SET "repo_id"=$1,"active"=$2,"name"=$3,"entry"=$4,"created_at"=$5,"created_by"=$6,"updated_at"=$7,"updated_by"=$8,"scheduled_at"=$9,"branch"=$10
WHERE "id" = $11`).
WithArgs(1, false, "nightly", "0 0 * * *", 1, "user1", NowTimestamp{}, "user2", nil, "main", 1).
WillReturnResult(sqlmock.NewResult(1, 1))

_sqlite := testSqlite(t)
Expand Down Expand Up @@ -107,6 +108,7 @@ func TestSchedule_Engine_UpdateSchedule_NotConfig(t *testing.T) {
_schedule.SetUpdatedAt(1)
_schedule.SetUpdatedBy("user2")
_schedule.SetScheduledAt(1)
_schedule.SetBranch("main")

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/drone/envsubst v1.0.3
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/assert/v2 v2.2.0
github.com/go-vela/types v0.20.1
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v53 v53.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
github.com/go-vela/types v0.20.1 h1:hHAX0Iij2J7UZ9f3SlXbwNy481CjKzU9CBfkiLuysVE=
github.com/go-vela/types v0.20.1/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY=
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d h1:ag6trc3Ev+7hzifeWy0M9rHHjrO9nFCYgW8dlKdZ4j4=
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down
7 changes: 3 additions & 4 deletions queue/redis/length_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ func TestRedis_Length(t *testing.T) {
// setup types
// use global variables in redis_test.go
_item := &types.Item{
Build: _build,
Pipeline: _steps,
Repo: _repo,
User: _user,
Build: _build,
Repo: _repo,
User: _user,
}

// setup queue item
Expand Down
7 changes: 3 additions & 4 deletions queue/redis/pop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ func TestRedis_Pop(t *testing.T) {
// setup types
// use global variables in redis_test.go
_item := &types.Item{
Build: _build,
Pipeline: _steps,
Repo: _repo,
User: _user,
Build: _build,
Repo: _repo,
User: _user,
}

// setup queue item
Expand Down
7 changes: 3 additions & 4 deletions queue/redis/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ func TestRedis_Push(t *testing.T) {
// setup types
// use global variables in redis_test.go
_item := &types.Item{
Build: _build,
Pipeline: _steps,
Repo: _repo,
User: _user,
Build: _build,
Repo: _repo,
User: _user,
}

// setup queue item
Expand Down
6 changes: 3 additions & 3 deletions scm/github/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,17 +548,17 @@ func (c *client) GetHTMLURL(u *library.User, org, repo, name, ref string) (strin
}

// GetBranch defines a function that retrieves a branch for a repo.
func (c *client) GetBranch(u *library.User, r *library.Repo) (string, string, error) {
func (c *client) GetBranch(u *library.User, r *library.Repo, branch string) (string, string, error) {
c.Logger.WithFields(logrus.Fields{
"org": r.GetOrg(),
"repo": r.GetName(),
"user": u.GetName(),
}).Tracef("retrieving branch %s for repo %s", r.GetBranch(), r.GetFullName())
}).Tracef("retrieving branch %s for repo %s", branch, r.GetFullName())

// create GitHub OAuth client with user's token
client := c.newClientToken(u.GetToken())

data, _, err := client.Repositories.GetBranch(ctx, r.GetOrg(), r.GetName(), r.GetBranch(), true)
data, _, err := client.Repositories.GetBranch(ctx, r.GetOrg(), r.GetName(), branch, true)
if err != nil {
return "", "", err
}
Expand Down
Loading

0 comments on commit 6828ded

Please sign in to comment.