feat(taskactions): rejecting a pr_open task closes its pull request

This commit is contained in:
sam committed 2026-10-05 20:11:38 +11:00
1 parent 8aaab2b9b7
commit ee3dbda777
13 files changed
+443 -232

No files matched your search

+4
View File
@@ -57,6 +57,10 @@ type PullRequestForge interface {
// PRState returns "open", "merged", or "closed" for a PR.
PRState(ctx context.Context, owner, repo string, number int) (string, error)
// ClosePR closes a pull request without merging, with an optional final
// comment.
ClosePR(ctx context.Context, owner, repo string, number int, comment string) error
}
// PullRequest is a forge-neutral summary of an existing pull request,
+4
View File
@@ -45,6 +45,10 @@ func (n *NoopForge) CreatePR(ctx context.Context, owner, repo, title, head, base
return 0, nil
}
func (n *NoopForge) ClosePR(ctx context.Context, owner, repo string, number int, comment string) error {
return nil
}
func (n *NoopForge) PRState(ctx context.Context, owner, repo string, number int) (string, error) {
return "closed", nil
}