Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

Commit 098e7c3

Browse files
committed
add keyring migration
this adds a migration that moves the git credentials from the global config to the repository keyring. temp squash later add keyring migration this adds a migration that moves the git credentials from the global config to the repository keyring.
1 parent 25114f9 commit 098e7c3

File tree

187 files changed

+7859
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+7859
-250
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ or can get the source code. And you must show them these terms so they
3838
know their rights.
3939

4040
Developers that use the GNU GPL protect your rights with two steps:
41-
(1) assert copyright on the software, and (2) offer you this License
41+
(1) require copyright on the software, and (2) offer you this License
4242
giving you legal permission to copy, distribute and/or modify it.
4343

4444
For the developers' and authors' protection, the GPL clearly explains

commands/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99

1010
"github.com/spf13/cobra"
1111

12-
mg1 "github.com/MichaelMure/git-bug-migration/migration1"
13-
mg1b "github.com/MichaelMure/git-bug-migration/migration1/bug"
14-
mg1r "github.com/MichaelMure/git-bug-migration/migration1/repository"
12+
mg1 "github.com/MichaelMure/git-bug-migration/migration01"
13+
mg1b "github.com/MichaelMure/git-bug-migration/migration01/after/bug"
14+
mg1r "github.com/MichaelMure/git-bug-migration/migration01/after/repository"
1515
)
1616

1717
const rootCommandName = "git-bug-migration"

go.mod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,22 @@ module github.com/MichaelMure/git-bug-migration
33
go 1.14
44

55
require (
6+
github.com/99designs/keyring v1.1.5
67
github.com/blang/semver v3.5.1+incompatible
78
github.com/dustin/go-humanize v1.0.0
89
github.com/fatih/color v1.9.0
10+
github.com/go-git/go-git/v5 v5.1.0
911
github.com/pkg/errors v0.9.1
12+
github.com/shurcooL/githubv4 v0.0.0-20200915023059-bc5e4feb2971
13+
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
1014
github.com/spf13/cobra v1.0.0
1115
github.com/stretchr/testify v1.6.1
16+
github.com/xanzy/go-gitlab v0.37.0
17+
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288
18+
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
1219
golang.org/x/text v0.3.3
1320
)
21+
22+
// Use a forked go-git for now until https://github.com/go-git/go-git/pull/112 is merged
23+
// and released.
24+
replace github.com/go-git/go-git/v5 => github.com/MichaelMure/go-git/v5 v5.1.1-0.20200827115354-b40ca794fe33

go.sum

Lines changed: 95 additions & 0 deletions
Large diffs are not rendered by default.

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import (
44
"github.com/MichaelMure/git-bug-migration/commands"
55
)
66

7+
type Migration interface {
8+
Name() string
9+
Description() string
10+
NeedToRun() bool
11+
Run() error
12+
}
13+
714
func main() {
815
commands.Execute()
916
}
File renamed without changes.

migration1/bug/bug.go renamed to migration01/after/bug/bug.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88

99
"github.com/pkg/errors"
1010

11-
"github.com/MichaelMure/git-bug-migration/migration1/entity"
12-
"github.com/MichaelMure/git-bug-migration/migration1/identity"
13-
"github.com/MichaelMure/git-bug-migration/migration1/repository"
14-
"github.com/MichaelMure/git-bug-migration/migration1/util/git"
15-
"github.com/MichaelMure/git-bug-migration/migration1/util/lamport"
11+
"github.com/MichaelMure/git-bug-migration/migration01/after/entity"
12+
"github.com/MichaelMure/git-bug-migration/migration01/after/identity"
13+
"github.com/MichaelMure/git-bug-migration/migration01/after/repository"
14+
"github.com/MichaelMure/git-bug-migration/migration01/after/util/git"
15+
"github.com/MichaelMure/git-bug-migration/migration01/after/util/lamport"
1616
)
1717

1818
const bugsRefPattern = "refs/bugs/"

migration1/bug/bug_actions.go renamed to migration01/after/bug/bug_actions.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/MichaelMure/git-bug-migration/migration1/entity"
8-
"github.com/MichaelMure/git-bug-migration/migration1/repository"
97
"github.com/pkg/errors"
8+
9+
"github.com/MichaelMure/git-bug-migration/migration01/after/entity"
10+
"github.com/MichaelMure/git-bug-migration/migration01/after/repository"
1011
)
1112

1213
// Fetch retrieve updates from a remote

migration1/bug/clocks.go renamed to migration01/after/bug/clocks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package bug
22

33
import (
4-
"github.com/MichaelMure/git-bug-migration/migration1/repository"
4+
"github.com/MichaelMure/git-bug-migration/migration01/after/repository"
55
)
66

77
// ClockLoader is the repository.ClockLoader for the Bug entity

migration1/bug/comment.go renamed to migration01/after/bug/comment.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package bug
22

33
import (
4-
"github.com/MichaelMure/git-bug-migration/migration1/entity"
5-
"github.com/MichaelMure/git-bug-migration/migration1/identity"
6-
"github.com/MichaelMure/git-bug-migration/migration1/util/git"
7-
"github.com/MichaelMure/git-bug-migration/migration1/util/timestamp"
84
"github.com/dustin/go-humanize"
5+
6+
"github.com/MichaelMure/git-bug-migration/migration01/after/entity"
7+
"github.com/MichaelMure/git-bug-migration/migration01/after/identity"
8+
"github.com/MichaelMure/git-bug-migration/migration01/after/util/git"
9+
"github.com/MichaelMure/git-bug-migration/migration01/after/util/timestamp"
910
)
1011

1112
// Comment represent a comment in a Bug

0 commit comments

Comments
 (0)