-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-12034: [Developer Tools] Formalize Minor PRs #9763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for opening a pull request! Could you open an issue for this pull request on JIRA? Then could you also rename pull request title in the following format? See also: |
|
Is there a good way to test this, especially the GHA part? |
|
The PR title check job is ran on the master branch. You can test this change by the following:
e.g.: kou#10 is a test PR that was used to test my change. |
354b522 to
28dca1b
Compare
|
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. |
|
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
});
} |
|
@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
There was a problem hiding this 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
@kou gave the pointer of testing on my fork above, which I did. |
|
+1 from me on the content |
|
I'll wait until at least Friday and then merge unless anyone objects. |
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
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>
No description provided.