Skip to content

Commit

Permalink
trying with Issue struct
Browse files Browse the repository at this point in the history
  • Loading branch information
amenocal committed Jul 23, 2024
1 parent 1dc8352 commit 20ecc32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func WriteToIssue(issueNumber int, comment string) error {
return fmt.Errorf("GITHUB_CONTEXT is not set or empty")
}

var issueEvent github.IssueEvent
var issueEvent github.Issue

err := json.Unmarshal([]byte(githubContext), &issueEvent)
if err != nil {
Expand All @@ -279,7 +279,7 @@ func WriteToIssue(issueNumber int, comment string) error {

//ctx := context.WithValue(context.Background(), github.SleepUntilPrimaryRateLimitResetWhenRateLimited, true)
//fmt.Printf("github context: %v", os.Getenv("GITHUB_CONTEXT"))
fmt.Printf("github Issue Number: %v", issueEvent.Issue.Number)
fmt.Printf("github Issue Number: %v", issueEvent.Number)
fmt.Printf("comment: %v", comment)
//_, _, err := client.Issues.CreateComment(ctx, viper.Get("TARGET_ORGANIZATION").(string), viper.Get("REPOSITORY").(string), issueNumber, &github.IssueComment{Body: &comment})
// if err != nil {
Expand Down

0 comments on commit 20ecc32

Please sign in to comment.