Skip to content

Commit

Permalink
fix: only update when necessary, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 30, 2024
1 parent 2246b3d commit ac86e63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scm/github/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func (c *client) GetNetrcPassword(ctx context.Context, db database.Interface, r
l.Tracef("using github app installation token for %s/%s", r.GetOrg(), r.GetName())

// (optional) sync the install ID with the repo
if db != nil {
if db != nil && r.GetInstallID() != installID {
r.SetInstallID(installID)

_, err = db.UpdateRepo(ctx, r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
"suspended_at": null
},
"repositories_added": [

],
"repositories_removed": [
{
"id": 1,
"node_id": "MDEwOlJlcG9zaXRvcnkxMTg=",
Expand All @@ -63,9 +66,6 @@
"full_name": "Codertocat/Hello-World2",
"private": false
}
],
"repositories_removed": [

],
"requester": null,
"enterprise": {
Expand Down

0 comments on commit ac86e63

Please sign in to comment.