You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-29 21:48:14 +02:00
Support github refresh tokens (#3811)
This commit is contained in:
@@ -65,7 +65,7 @@ func Test_github(t *testing.T) {
|
||||
forge, _ := New(Opts{})
|
||||
netrc, _ := forge.Netrc(fakeUser, fakeRepo)
|
||||
g.Assert(netrc.Machine).Equal("github.com")
|
||||
g.Assert(netrc.Login).Equal(fakeUser.Token)
|
||||
g.Assert(netrc.Login).Equal(fakeUser.AccessToken)
|
||||
g.Assert(netrc.Password).Equal("x-oauth-basic")
|
||||
})
|
||||
g.It("Should return a netrc with the machine account", func() {
|
||||
@@ -115,8 +115,8 @@ func Test_github(t *testing.T) {
|
||||
|
||||
var (
|
||||
fakeUser = &model.User{
|
||||
Login: "octocat",
|
||||
Token: "cfcd2084",
|
||||
Login: "octocat",
|
||||
AccessToken: "cfcd2084",
|
||||
}
|
||||
|
||||
fakeRepo = &model.Repo{
|
||||
|
||||
Reference in New Issue
Block a user