Skip to content

Commit caca334

Browse files
committed
5
1 parent 3a7d786 commit caca334

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

.github/workflows/awesome/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module _
22

33
go 1.19
44

5-
require github.com/dsp-testing/github-go-script v0.0.0-20230224125130-8a52b90fb77d
5+
require github.com/dsp-testing/github-go-script v0.0.0-20230224143631-12d2976eb250
66

77
require (
88
github.com/golang/protobuf v1.3.2 // indirect

.github/workflows/awesome/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/dsp-testing/github-go-script v0.0.0-20230224125130-8a52b90fb77d h1:MemP9CEyu2gi/fQhfUWQkF/WynvFh8Gq1PR1nA8xpRA=
2-
github.com/dsp-testing/github-go-script v0.0.0-20230224125130-8a52b90fb77d/go.mod h1:pMQ5ZEwvCSQ6i9qrJrlZGEWc+SlwRu7eEaWGnsxtCVM=
1+
github.com/dsp-testing/github-go-script v0.0.0-20230224143631-12d2976eb250 h1:l663gNWjifWXBqhZOPFUfF6goHlt04BAKesAAk51JSs=
2+
github.com/dsp-testing/github-go-script v0.0.0-20230224143631-12d2976eb250/go.mod h1:pMQ5ZEwvCSQ6i9qrJrlZGEWc+SlwRu7eEaWGnsxtCVM=
33
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
44
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
55
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=

.github/workflows/awesome/main.go

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
package main
22

33
import (
4-
"fmt"
4+
"fmt"
55

6-
github_go_script "github.com/dsp-testing/github-go-script"
6+
github_go_script "github.com/dsp-testing/github-go-script"
77
)
88

99
func main() {
10-
github_go_script.Call(func(options *github_go_script.Options) error {
11-
// TODO: Replace this with your code
12-
repo, _, err := options.Client.Repositories.Get(options.Ctx, options.Context.Repository.OwnerName, options.Context.Repository.Name)
13-
if err != nil {
14-
return err
15-
}
16-
fmt.Printf("Repository name: %s\n", repo.GetName())
17-
fmt.Printf("Triggering event name: %s\n", options.Context.EventName)
18-
return nil
19-
})
20-
}
10+
github_go_script.Call(func(options *github_go_script.Options) (map[string]string, error) {
11+
// TODO: Replace this with your code
12+
repo, _, err := options.Client.Repositories.Get(options.Ctx, options.Context.Repository.OwnerName, options.Context.Repository.Name)
13+
if err != nil {
14+
return nil, err
15+
}
16+
fmt.Printf("Repository name: %s\n", repo.GetName())
17+
fmt.Printf("Triggering event name: %s\n", options.Context.EventName)
18+
return map[string]string{
19+
"repository_name": repo.GetName(),
20+
"event_name": options.Context.EventName,
21+
}, nil
22+
})
23+
}

0 commit comments

Comments
 (0)