Replace mentions to github and forgejo for stackit git
This commit is contained in:
parent
2bcb71ffdf
commit
023907bee4
5 changed files with 12 additions and 12 deletions
8
main.go
8
main.go
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
// patchIssueState closes or otherwise updates an issue's state without decoding
|
||||
// the response body into a github.Issue. go-github's Issues.Edit decodes the
|
||||
// response into github.Issue, which fails against Forgejo because its issue
|
||||
// response into github.Issue, which fails against StackitGit because its issue
|
||||
// response embeds "repository.owner" as a plain string rather than a User object.
|
||||
func patchIssueState(_ context.Context, client *forgejo.Client, owner, repo string, number int, state string) error {
|
||||
issueState := forgejo.StateType(state)
|
||||
|
|
@ -125,12 +125,12 @@ func newForgejoClient() (*forgejo.Client, error) {
|
|||
token := os.Getenv(envVarToken)
|
||||
serverUrl := os.Getenv("GITHUB_SERVER_URL")
|
||||
if serverUrl == "" {
|
||||
return nil, fmt.Errorf("GITHUB_SERVER_URL must be set for Forgejo client")
|
||||
return nil, fmt.Errorf("GITHUB_SERVER_URL must be set for StackitGit client")
|
||||
}
|
||||
|
||||
client, err := forgejo.NewClient(serverUrl, forgejo.SetToken(token))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create forgejo client: %w", err)
|
||||
return nil, fmt.Errorf("failed to create StackitGit client: %w", err)
|
||||
}
|
||||
return client, nil
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ func main() {
|
|||
ctx := context.Background()
|
||||
forgejoClient, err := newForgejoClient()
|
||||
if err != nil {
|
||||
fmt.Printf("error connecting to forgejo server: %v\n", err)
|
||||
fmt.Printf("error connecting to StackitGit server: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue