From 3b328b1e18a85b6895e16c795ae6aa30210fae7f Mon Sep 17 00:00:00 2001 From: Micah Kornfield Date: Sun, 21 Mar 2021 10:33:17 -0700 Subject: [PATCH 1/3] ARROW-12034: [Developer Tools] Formalize Minor PRs --- .github/workflows/dev_pr/title_check.js | 3 +++ .github/workflows/dev_pr/title_check.md | 10 ++++++++-- CONTRIBUTING.md | 10 ++++++++++ dev/merge_arrow_pr.py | 11 +++++++++-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev_pr/title_check.js b/.github/workflows/dev_pr/title_check.js index 2a8d654567e..c1ebd9d3e4d 100644 --- a/.github/workflows/dev_pr/title_check.js +++ b/.github/workflows/dev_pr/title_check.js @@ -21,6 +21,9 @@ function haveJIRAID(title) { if (!title) { return false; } + if (title.startsWith("MINOR: ")) { + return true; + } return /^(WIP:?\s*)?(ARROW|PARQUET)-\d+/.test(title); } diff --git a/.github/workflows/dev_pr/title_check.md b/.github/workflows/dev_pr/title_check.md index f008f55620a..75e5b69ee65 100644 --- a/.github/workflows/dev_pr/title_check.md +++ b/.github/workflows/dev_pr/title_check.md @@ -19,13 +19,19 @@ Thanks for opening a pull request! -Could you open an issue for this pull request on JIRA? -https://issues.apache.org/jira/browse/ARROW +If this is not a [minor PR](https://github.com/apache/arrow/blob/master/.github/CONTRIBUTING.md#Minor-Fixes). +Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW + +Opening JIRAs ahead of time contribute to the values of [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) in the Apache Arrow project. Then could you also rename pull request title in the following format? ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY} +or + + MINOR: [${COMPONENT}] ${SUMMARY} + See also: * [Other pull requests](https://github.com/apache/arrow/pulls/) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 380886872fa..d6f6ba12229 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,16 @@ with the JIRA issue number and the component name in brackets. Respecting this convention makes it easier for us to process the backlog of submitted Pull Requests. +### Minor Fixes + +Any functionality change should have a JIRA opened. For minor changes that +affect documentation, you do not need to open up a JIRA. Instead you can +title your PR "MINOR: " if meets the following guidelines: + +* Grammar, usage and spelling fixes that affect no more than 2 files +* Documentation updates affecting no more than 2 files and not more + than 500 words. + ## Do you want to propose a significant new feature or an important refactoring? We ask that all discussions about major changes in the codebase happen diff --git a/dev/merge_arrow_pr.py b/dev/merge_arrow_pr.py index 9036c012313..dfc45a2590e 100755 --- a/dev/merge_arrow_pr.py +++ b/dev/merge_arrow_pr.py @@ -316,7 +316,10 @@ def show(self): print("\n=== Pull Request #%s ===" % self.number) print("title\t%s\nsource\t%s\ntarget\t%s\nurl\t%s" % (self.title, self.description, self.target_ref, self.url)) - self.jira_issue.show() + if self.jira_issue is not None: + self.jira_issue.show() + else: + print("Minor PR. Please ensure it meets guidelines for minor.\n") @property def is_merged(self): @@ -334,7 +337,7 @@ def _get_jira(self): jira_id = m.group(1) break - if jira_id is None: + if jira_id is None and not self.title.startswith("MINOR:"): options = ' or '.join('{0}-XXX'.format(project) for project in SUPPORTED_PROJECTS) self.cmd.fail("PR title should be prefixed by a jira id " @@ -585,6 +588,10 @@ def cli(): # merged hash not used pr.merge() + if pr.jira_issue is None: + print("Minor PR. No JIRA issue to update.\n") + return + cmd.continue_maybe("Would you like to update the associated JIRA?") jira_comment = ( "Issue resolved by pull request %s\n[%s/%s]" From 28dca1b5cfd28fb09d2628c0f78a52c395589d8a Mon Sep 17 00:00:00 2001 From: Micah Kornfield Date: Sun, 28 Mar 2021 10:47:39 -0700 Subject: [PATCH 2/3] fix more typos --- .github/workflows/dev_pr/title_check.md | 5 ++--- CONTRIBUTING.md | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev_pr/title_check.md b/.github/workflows/dev_pr/title_check.md index 75e5b69ee65..f38af6a2175 100644 --- a/.github/workflows/dev_pr/title_check.md +++ b/.github/workflows/dev_pr/title_check.md @@ -19,10 +19,9 @@ Thanks for opening a pull request! -If this is not a [minor PR](https://github.com/apache/arrow/blob/master/.github/CONTRIBUTING.md#Minor-Fixes). -Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW +If this is not a [minor PR](https://github.com/apache/arrow/blob/master/.github/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW -Opening JIRAs ahead of time contribute to the values of [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) in the Apache Arrow project. +Opening JIRAs ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project. Then could you also rename pull request title in the following format? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6f6ba12229..3e636d9cd2f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,7 +57,7 @@ of submitted Pull Requests. Any functionality change should have a JIRA opened. For minor changes that affect documentation, you do not need to open up a JIRA. Instead you can -title your PR "MINOR: " if meets the following guidelines: +prefix the title of your PR with "MINOR: " if meets the following guidelines: * Grammar, usage and spelling fixes that affect no more than 2 files * Documentation updates affecting no more than 2 files and not more From fe595e366632a990be1bca05abb74158076c7855 Mon Sep 17 00:00:00 2001 From: emkornfield Date: Mon, 29 Mar 2021 19:03:54 -0700 Subject: [PATCH 3/3] Update merge_arrow_pr.py fix indentation --- dev/merge_arrow_pr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/merge_arrow_pr.py b/dev/merge_arrow_pr.py index dfc45a2590e..373ceb8e20f 100755 --- a/dev/merge_arrow_pr.py +++ b/dev/merge_arrow_pr.py @@ -589,8 +589,8 @@ def cli(): pr.merge() if pr.jira_issue is None: - print("Minor PR. No JIRA issue to update.\n") - return + print("Minor PR. No JIRA issue to update.\n") + return cmd.continue_maybe("Would you like to update the associated JIRA?") jira_comment = (