Skip to content

Commit

Permalink
ARROW-12034: [Developer Tools] Formalize Minor PRs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
emkornfield and emkornfield committed Apr 4, 2021
1 parent beb1c1b commit 5cabd31
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dev_pr/title_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/dev_pr/title_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@

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 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?

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

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

* [Other pull requests](https://github.com/apache/arrow/pulls/)
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
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
Expand Down
11 changes: 9 additions & 2 deletions dev/merge_arrow_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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 "
Expand Down Expand Up @@ -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]"
Expand Down

0 comments on commit 5cabd31

Please sign in to comment.