You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by am...@apache.org on 2022/11/30 14:16:32 UTC

[arrow] branch github-link-pr-issue created (now 50d7477f92)

This is an automated email from the ASF dual-hosted git repository.

amolina pushed a change to branch github-link-pr-issue
in repository https://gitbox.apache.org/repos/asf/arrow.git


      at 50d7477f92 MINOR: Setup linking between PR and Issue in GitHub

This branch includes the following new commits:

     new 50d7477f92 MINOR: Setup linking between PR and Issue in GitHub

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[arrow] 01/01: MINOR: Setup linking between PR and Issue in GitHub

Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

amolina pushed a commit to branch github-link-pr-issue
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit 50d7477f924a99201a716c1cc26488d032a4befd
Author: Alessandro Molina <am...@turbogears.org>
AuthorDate: Wed Nov 30 15:16:26 2022 +0100

    MINOR: Setup linking between PR and Issue in GitHub
---
 .github/workflows/dev_pr/link.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/dev_pr/link.js b/.github/workflows/dev_pr/link.js
index 7d99ca1053..2a048003ed 100644
--- a/.github/workflows/dev_pr/link.js
+++ b/.github/workflows/dev_pr/link.js
@@ -82,11 +82,21 @@ 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){
+    const pullInfo = await github.issues.get({
+        issue_number: issueID,
+        owner: context.repo.owner,
+        repo: context.repo.repo,
+    }).data;
+    await github.pulls.update({
+      owner: context.repo.owner,
+      repo: context.repo.repo,
+      body: pullInfo.body + "\n" + message;
+    });
     await github.issues.createComment({
       owner: context.repo.owner,
       repo: context.repo.repo,