From 9d3ec9680f6d3c51eccc7f81a6ad838c8199e3ce Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Wed, 11 Nov 2020 09:56:49 -0500 Subject: [PATCH] prefer .repo.owner.login --- actions/updateaction/release.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actions/updateaction/release.go b/actions/updateaction/release.go index 9a73d21..12be7f8 100644 --- a/actions/updateaction/release.go +++ b/actions/updateaction/release.go @@ -27,6 +27,7 @@ func (h *handler) Release(ctx context.Context, evt *github.ReleaseEvent) error { if err != nil { return err } + logrus.WithField("issue_number", feedbackIssue.Number).Debug("created feedback issue") dispatchOpts, err := releaseDispatchOptions(evt, feedbackIssue) if err != nil { @@ -58,7 +59,7 @@ func releaseFeedbackIssue(ctx context.Context, gh *github.Client, evt *github.Re _, _ = fmt.Fprintf(&body, "- [ ] %s\n", r) } - issue, _, err := gh.Issues.Create(ctx, ghRepo.GetOwner().GetName(), ghRepo.GetName(), &github.IssueRequest{ + issue, _, err := gh.Issues.Create(ctx, ghRepo.GetOwner().GetLogin(), ghRepo.GetName(), &github.IssueRequest{ Title: github.String(fmt.Sprintf("Release feedback: %s", evt.GetRelease().GetTagName())), Body: github.String(body.String()), }) @@ -70,7 +71,7 @@ func releaseDispatchOptions(evt *github.ReleaseEvent, feedbackIssue *github.Issu Path: fmt.Sprintf("github.com/%s", evt.GetRepo().GetFullName()), Next: evt.GetRelease().GetTagName(), Feedback: RepoDispatchActionUpdatePayloadFeedback{ - Owner: feedbackIssue.GetRepository().GetOwner().GetName(), + Owner: feedbackIssue.GetRepository().GetOwner().GetLogin(), Name: feedbackIssue.GetRepository().GetName(), IssueNumber: feedbackIssue.GetNumber(), },