Skip to content

Conversation

@emkornfield
Copy link
Contributor

No description provided.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@emkornfield emkornfield changed the title [Developer Tools] Formalize Minor PRs ARROW-12034: [Developer Tools] Formalize Minor PRs Mar 21, 2021
@emkornfield
Copy link
Contributor Author

Is there a good way to test this, especially the GHA part?

@github-actions
Copy link

@kou
Copy link
Member

kou commented Mar 21, 2021

The PR title check job is ran on the master branch.

You can test this change by the following:

  1. Push the change to https://github.com/emkornfield/arrow/tree/master (not apache/arrow)
  2. Create a test PR on https://github.com/emkornfield/arrow (not apache/arrow)

e.g.: kou#10 is a test PR that was used to test my change.

@emkornfield
Copy link
Contributor Author

Thanks @kou, finally had a time to test this out. It seems to work. One question is if I should add a GHA that provides positive confirmation that the "MINOR:" title is correct.

@kou
Copy link
Member

kou commented Mar 28, 2021

I don't think that we need it but it may be able to implement by the following:

diff --git a/.github/workflows/dev_pr/link.js b/.github/workflows/dev_pr/link.js
index 550a9cd39..c27b5f8f1 100644
--- a/.github/workflows/dev_pr/link.js
+++ b/.github/workflows/dev_pr/link.js
@@ -19,6 +19,9 @@ function detectJIRAID(title) {
   if (!title) {
     return null;
   }
+  if (title.startsWith("MINOR: ") {
+    return "MINOR";
+  }
   const matched = /^(WIP:?\s*)?((ARROW|PARQUET)-\d+)/.exec(title);
   if (!matched) {
     return null;
@@ -47,15 +50,20 @@ async function haveComment(github, context, pullRequestNumber, body) {
 }
 
 async function commentJIRAURL(github, context, pullRequestNumber, jiraID) {
-  const jiraURL = `https://issues.apache.org/jira/browse/${jiraID}`;
-  if (await haveComment(github, context, pullRequestNumber, jiraURL)) {
+  let body;
+  if (jiraID === "MINOR") {
+    body = 'This is a minor PR.';
+  } else {
+    body = `https://issues.apache.org/jira/browse/${jiraID}`;
+  }
+  if (await haveComment(github, context, pullRequestNumber, body)) {
     return;
   }
   await github.issues.createComment({
     owner: context.repo.owner,
     repo: context.repo.repo,
     issue_number: pullRequestNumber,
-    body: jiraURL
+    body: body
   });
 }

@emkornfield
Copy link
Contributor Author

@kou I tend to agree it might not be need, just might need some getting used of no GHA if MINOR is specified. If people complain, I'll try adding the proposed diff as a follow-up.

fix indentation
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The basic idea looks good to me. Thank you @emkornfield

I do not know how to test the automation / scripts other than "in production" but that might be ok for this kind of PR

@emkornfield
Copy link
Contributor Author

I do not know how to test the automation / scripts other than "in production" but that might be ok for this kind of PR

@kou gave the pointer of testing on my fork above, which I did.

@wesm
Copy link
Member

wesm commented Mar 30, 2021

+1 from me on the content

@emkornfield
Copy link
Contributor Author

I'll wait until at least Friday and then merge unless anyone objects.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

pachadotdev pushed a commit to pachadotdev/arrow that referenced this pull request Apr 5, 2021
Closes apache#9763 from emkornfield/trivial_prs

Lead-authored-by: Micah Kornfield <emkornfield@gmail.com>
Co-authored-by: emkornfield <micahk@google.com>
Signed-off-by: Micah Kornfield <emkornfield@gmail.com>
@emkornfield emkornfield deleted the trivial_prs branch April 7, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants