From 0617a61d57f49a9f5ccac08062a4613de8c7a29c Mon Sep 17 00:00:00 2001 From: peter-evans Date: Mon, 8 Feb 2021 00:35:39 +0000 Subject: [PATCH] [CI] test committed --- dist/index.js | 14 ++++++-------- report.txt | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 report.txt diff --git a/dist/index.js b/dist/index.js index 0e053ae..14193bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -975,22 +975,20 @@ class GitHubHelper { const headBranch = `${headOwner}:${inputs.branch}`; // Create or update the pull request const pull = yield this.createOrUpdate(inputs, baseRepository, headBranch); - // Set milestone, labels and assignees - const updateIssueParams = {}; + // Apply milestone if (inputs.milestone) { - updateIssueParams['milestone'] = inputs.milestone; core.info(`Applying milestone '${inputs.milestone}'`); + yield this.octokit.issues.update(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { issue_number: pull.number, milestone: inputs.milestone })); } + // Apply labels if (inputs.labels.length > 0) { - updateIssueParams['labels'] = inputs.labels; core.info(`Applying labels '${inputs.labels}'`); + yield this.octokit.issues.addLabels(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { issue_number: pull.number, labels: inputs.labels })); } + // Apply assignees if (inputs.assignees.length > 0) { - updateIssueParams['assignees'] = inputs.assignees; core.info(`Applying assignees '${inputs.assignees}'`); - } - if (Object.keys(updateIssueParams).length > 0) { - yield this.octokit.issues.update(Object.assign(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { issue_number: pull.number }), updateIssueParams)); + yield this.octokit.issues.addAssignees(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { issue_number: pull.number, labels: inputs.assignees })); } // Request reviewers and team reviewers const requestReviewersParams = {}; diff --git a/report.txt b/report.txt new file mode 100644 index 0000000..be89182 --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1612744539