raulcd commented on code in PR #14783: URL: https://github.com/apache/arrow/pull/14783#discussion_r1036105764
########## .github/workflows/dev_pr/link.js: ########## @@ -82,11 +82,22 @@ 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.pulls.get({ + pull_number: pullRequestNumber, + owner: context.repo.owner, + repo: context.repo.repo, + }).data; + await github.pulls.update({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: pullRequestNumber, + body: pullInfo.body + "\n" + message; Review Comment: we can retrieve the body from the context: ```suggestion body: context.payload.pull_request.body + "\n" + message ``` and avoid doing the request for the PR. I've tested this on my fork and the only annoying thing is that we might want to deal with the body being null, see here: https://github.com/raulcd/arrow/pull/56#issue-1467688003 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org