exasol / github-keeper

Tool for unifying our GitHub repository setup. Superseded by github-issue-adapter
MIT License
2 stars 1 forks source link

configure-repo fails when running on a fresh repo #29

Closed kaklakariada closed 2 years ago

kaklakariada commented 2 years ago

The configure-repo command fails when run against a fresh repository:

% github-keeper configure-repo metabase-driver

metabase-driver 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13d3084]

goroutine 1 [running]:
github.com/exasol/github-keeper/cmd.BranchProtectionVerifier.CheckIfBranchProtectionIsApplied({{0x7ffeefbffb4d, 0xc000128008}, 0xc0001a8000}, 0x5)
    /Users/chp/go/pkg/mod/github.com/exasol/github-keeper@v0.0.0-20211118101907-26b675c2312d/cmd/branchProtection.go:52 +0xa4
github.com/exasol/github-keeper/cmd.glob..func1(0x189f220, {0xc0001110f0, 0x1, 0x1})
    /Users/chp/go/pkg/mod/github.com/exasol/github-keeper@v0.0.0-20211118101907-26b675c2312d/cmd/configureRepo.go:28 +0x15e
github.com/spf13/cobra.(*Command).execute(0x189f220, {0xc0001110d0, 0x1, 0x1})
    /Users/chp/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x189f720)
    /Users/chp/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/chp/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/exasol/github-keeper/cmd.Execute()
    /Users/chp/go/pkg/mod/github.com/exasol/github-keeper@v0.0.0-20211118101907-26b675c2312d/cmd/root.go:16 +0x25
main.main()
    /Users/chp/go/pkg/mod/github.com/exasol/github-keeper@v0.0.0-20211118101907-26b675c2312d/main.go:6 +0x17