pitrou commented on code in PR #14731:
URL: https://github.com/apache/arrow/pull/14731#discussion_r1032148886
##########
.github/workflows/dev_pr/issue_check.js:
##########
@@ -78,11 +78,42 @@ async function commentNotStartedTicket(github, context,
pullRequestNumber) {
}
}
+async function verifyGitHubIssue(github, context, pullRequestNumber, issueID) {
+ const issueInfo = await helpers.getGitHubInfo(github, context, issueID,
pullRequestNumber);
+ if (issueInfo) {
+ if (!issueInfo.assignees.length) {
+ await github.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pullRequestNumber,
+ body: ":warning: GitHub issue #" + issueID + " **has not been
assigned in GitHub**, please assign the ticket."
+ })
+ }
+ if(!issueInfo.labels.length) {
+ await github.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pullRequestNumber,
+ body: ":warning: GitHub issue #" + issueID + " **has no labels
in GitHub**, please add labels for components."
+ })
+ }
+ } else {
+ await github.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pullRequestNumber,
+ body: ":warning: GitHub issue #" + issueID + " could not be
retrieved."
Review Comment:
This should be more of an error than a warning, but I guess the list of
available emojis is limited.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]