Skip to content

Commit

Permalink
🏗️ Change namespace to SyliusLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Jan 25, 2023
1 parent 439c2cc commit 63457a4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
14 changes: 7 additions & 7 deletions cmd/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package cmd

import (
"fmt"
"github.com/jakubtobiasz/gh-kit/internal/github/client/issue"
pull_request_client "github.com/jakubtobiasz/gh-kit/internal/github/client/pull_request"
"github.com/jakubtobiasz/gh-kit/internal/github/current_repository"
"github.com/jakubtobiasz/gh-kit/internal/github/pull_request"
"github.com/SyliusLabs/gh-kit/internal/github/client/issue"
pullRequestClient "github.com/SyliusLabs/gh-kit/internal/github/client/pull_request"
"github.com/SyliusLabs/gh-kit/internal/github/current_repository"
"github.com/SyliusLabs/gh-kit/internal/github/pull_request"
"github.com/spf13/cobra"
)

var allowedMergeStrategies = map[string]bool{"merge": true, "squash": true, "rebase": true}

var mergeCmd = &cobra.Command{
Use: "merge",
Use: "merge <pull_request_number>",
Short: "Merge a pull request",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand All @@ -22,7 +22,7 @@ var mergeCmd = &cobra.Command{
return
}

pr, prErr := pull_request_client.GetData(repo, args[0])
pr, prErr := pullRequestClient.GetData(repo, args[0])
if nil != prErr {
fmt.Println("The pull request does not exist")
return
Expand All @@ -42,7 +42,7 @@ var mergeCmd = &cobra.Command{
mergeCategory, _ := cmd.Flags().GetString("category")
mergeSubject := pull_request.GenerateSubjectWithCategory(mergeCategory, pr.GetNumber(), pr.GetTitle(), pr.GetUser().GetLogin())

commits, commitsErr := pull_request_client.GetCommits(repo, pr.GetNumber())
commits, commitsErr := pullRequestClient.GetCommits(repo, pr.GetNumber())
if nil != commitsErr {
fmt.Println("The pull request commits could not be fetched")
return
Expand Down
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
module github.com/jakubtobiasz/gh-kit
module github.com/SyliusLabs/gh-kit

go 1.19

require github.com/cli/go-gh v1.0.0
require (
github.com/cli/go-gh v1.0.0
github.com/google/go-github/v49 v49.1.0
github.com/spf13/cobra v1.6.1
)

require (
github.com/cli/safeexec v1.0.0 // indirect
github.com/cli/shurcooL-graphql v0.0.2 // indirect
github.com/google/go-github/v49 v49.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/henvic/httpretty v0.0.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -17,7 +20,6 @@ require (
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/muesli/termenv v0.12.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-github/v49 v49.1.0 h1:LFkMgawGQ8dfzWLH/rNE0b3u1D3n6/dw7ZmrN3b+YFY=
github.com/google/go-github/v49 v49.1.0/go.mod h1:MUUzHPrhGniB6vUKa27y37likpipzG+BXXJbG04J334=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
Expand Down
4 changes: 2 additions & 2 deletions internal/github/client/issue/commenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/SyliusLabs/gh-kit/internal/factory"
"github.com/SyliusLabs/gh-kit/internal/github/current_repository"
"github.com/cli/go-gh/pkg/api"
"github.com/jakubtobiasz/gh-kit/internal/factory"
"github.com/jakubtobiasz/gh-kit/internal/github/current_repository"
)

var client api.RESTClient
Expand Down
4 changes: 2 additions & 2 deletions internal/github/client/pull_request/data_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package pull_request

import (
"fmt"
"github.com/SyliusLabs/gh-kit/internal/factory"
"github.com/SyliusLabs/gh-kit/internal/github/current_repository"
"github.com/cli/go-gh/pkg/api"
"github.com/google/go-github/v49/github"
"github.com/jakubtobiasz/gh-kit/internal/factory"
"github.com/jakubtobiasz/gh-kit/internal/github/current_repository"
)

var client api.RESTClient
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/jakubtobiasz/gh-kit/cmd"
"github.com/SyliusLabs/gh-kit/cmd"
)

func main() {
Expand Down

0 comments on commit 63457a4

Please sign in to comment.