This is an automated email from the ASF dual-hosted git repository.
amolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 6f4a539323 MINOR: Setup linking between PR and Issue in GitHub (#14783)
6f4a539323 is described below
commit 6f4a539323da0d6aef528ccce2404e36f0a08585
Author: Alessandro Molina <[email protected]>
AuthorDate: Wed Nov 30 17:24:42 2022 +0100
MINOR: Setup linking between PR and Issue in GitHub (#14783)
Lead-authored-by: Alessandro Molina <[email protected]>
Co-authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Alessandro Molina <[email protected]>
---
.github/workflows/dev_pr/link.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/dev_pr/link.js b/.github/workflows/dev_pr/link.js
index 7d99ca1053..1fbd044717 100644
--- a/.github/workflows/dev_pr/link.js
+++ b/.github/workflows/dev_pr/link.js
@@ -82,11 +82,17 @@ async function commentJIRAURL(github, context,
pullRequestNumber, jiraID) {
async function commentGitHubURL(github, context, pullRequestNumber, issueID) {
// Make the call to ensure issue exists before adding comment
const issueInfo = await helpers.getGitHubInfo(github, context, issueID,
pullRequestNumber);
- const message = "* Github Issue: #" + issueInfo.number
+ const message = "* Closes: #" + issueInfo.number
if (await haveComment(github, context, pullRequestNumber, message)) {
return;
}
if (issueInfo){
+ await github.pulls.update({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pullRequestNumber,
+ body: (context.payload.pull_request.body || "") + "\n" + message
+ });
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,