Skip to content

Commit

Permalink
Update comment when issue is in different repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ribtoks committed Jan 18, 2025
1 parent ac5171b commit f0431e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,11 @@ func (s *service) closeMissingIssues(issueMap map[string]*github.Issue, comments
}

if s.env.commentIssue {
s.commentIssue(fmt.Sprintf("Closed in commit %v", s.env.sha), i)
commitRef := s.env.sha
if (s.env.codeRepo != s.env.issueRepo) || (s.env.codeOwner != s.env.issueOwner) {
commitRef = fmt.Sprintf("%s/%s@%s", s.env.codeOwner, s.env.codeRepo, s.env.sha)
}
s.commentIssue(fmt.Sprintf("Closed in commit %v", commitRef), i)
}

req := &github.IssueRequest{
Expand Down

0 comments on commit f0431e3

Please sign in to comment.