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:33 UTC
[arrow] 01/01: MINOR: Setup linking between PR and Issue in GitHub
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,