Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions actions/setup/js/submit_pr_review.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ async function main(config = {}) {
// If create_pull_request_review_comment already set context, this is a no-op.
// Use target config as single source of truth (same as add_comment): resolveTarget first, then use payload PR only when it matches.
if (!buffer.getReviewContext()) {
const repo = `${context.repo.owner}/${context.repo.repo}`;
const repoParts = { owner: context.repo.owner, repo: context.repo.repo };

const targetResult = resolveTarget({
targetConfig,
item: message,
Expand All @@ -106,6 +103,8 @@ async function main(config = {}) {
}
} else if (targetResult.number) {
const prNum = targetResult.number;
const repo = `${context.repo.owner}/${context.repo.repo}`;
const repoParts = { owner: context.repo.owner, repo: context.repo.repo };
const payloadPR = context.payload?.pull_request;
const usePayloadPR = payloadPR && payloadPR.number === prNum && payloadPR.head?.sha;

Expand Down
3 changes: 1 addition & 2 deletions pkg/workflow/submit_pr_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ func (c *Compiler) parseSubmitPullRequestReviewConfig(outputMap map[string]any)

// Parse target (same semantics as add-comment / create-pull-request-review-comment)
if target, exists := configMap["target"]; exists {
if targetStr, ok := target.(string); ok && targetStr != "" {
if targetStr, ok := target.(string); ok {
config.Target = targetStr
submitPRReviewLog.Printf("Target: %s", config.Target)
}
}

Expand Down