Skip to content

Commit fe32a7d

Browse files
raulcdassignUserkou
authored
apacheGH-44934: [Dev] Remove JIRA remnants (apache#44936)
### Rationale for this change We are not using JIRA anymore in the project ### What changes are included in this PR? Remove JIRA from: - documentation - pr and issue templates - comment bot - merge script ### Are these changes tested? Via CI ### Are there any user-facing changes? No * GitHub Issue: apache#44934 Lead-authored-by: Raúl Cumplido <[email protected]> Co-authored-by: Jacob Wujciak-Jens <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
1 parent 8ac434f commit fe32a7d

15 files changed

+138
-559
lines changed

.github/CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ issues][3] for the Apache Arrow project. Comment on the issue and/or contact
4545
[[email protected]](https://lists.apache.org/[email protected])
4646
with your questions and ideas.
4747

48-
If you’d like to report a bug but don’t have time to fix it, you can still post
49-
it on JIRA, or email the mailing list
48+
If you’d like to report a bug but don’t have time to fix it, you can still create
49+
a GitHub issue, or email the mailing list
5050
[[email protected]](https://lists.apache.org/[email protected])
5151

5252
To contribute a patch:
@@ -57,8 +57,8 @@ harder to merge in a large change with a lot of disjoint features.
5757
GitHub](https://github.com/apache/arrow/issues).
5858
3. Submit the patch as a GitHub pull request against the main branch. For a
5959
tutorial, see the GitHub guides on [forking a repo](https://help.github.com/en/articles/fork-a-repo)
60-
and [sending a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). So that your pull request syncs with the JIRA issue, prefix your pull request
61-
name with the JIRA issue id (ex: [ARROW-767: [C++] Filesystem abstraction](https://github.com/apache/arrow/pull/4225))
60+
and [sending a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). Prefix your pull request
61+
name with the GitHub issue id (ex: [GH-767: [C++] Filesystem abstraction](https://github.com/apache/arrow/pull/4225))
6262
4. Make sure that your code passes the unit tests. You can find instructions
6363
how to run the unit tests for each Arrow component in its respective README
6464
file.

.github/pull_request_template.md

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ or
1919
2020
MINOR: [${COMPONENT}] ${SUMMARY}
2121
22-
In the case of PARQUET issues on JIRA the title also supports:
23-
24-
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
25-
2622
-->
2723

2824
### Rationale for this change

.github/workflows/dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
shell: bash
125125
run: |
126126
gem install test-unit
127-
pip install "cython>=0.29.31" setuptools pytest jira setuptools-scm
127+
pip install "cython>=0.29.31" setuptools pytest requests setuptools-scm
128128
- name: Run Release Test
129129
env:
130130
ARROW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dev_pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
ref: main
5050
persist-credentials: false
5151

52-
- name: Comment JIRA link
52+
- name: Add Issue link
5353
if: |
5454
(github.event.action == 'opened' ||
5555
github.event.action == 'edited')

.github/workflows/dev_pr/helpers.js

+2-29
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ const https = require('https');
2424
* @returns {Issue} or null if no issue detected.
2525
*
2626
* @typedef {Object} Issue
27-
* @property {string} kind - The kind of issue: minor, jira or github
28-
* @property {string} id - The id of the issue:
29-
* PARQUET-XXXX for jira
30-
* The numeric issue id for github
27+
* @property {string} kind - The kind of issue: minor or github
28+
* @property {string} id - The numeric issue id of the issue
3129
*/
3230
function detectIssue(title) {
3331
if (!title) {
@@ -36,38 +34,13 @@ function detectIssue(title) {
3634
if (title.startsWith("MINOR: ")) {
3735
return {"kind": "minor"};
3836
}
39-
const matched_jira = /^(WIP:?\s*)?((PARQUET)-\d+)/.exec(title);
40-
if (matched_jira) {
41-
return {"kind": "jira", "id": matched_jira[2]};
42-
}
4337
const matched_gh = /^(WIP:?\s*)?GH-(\d+)/.exec(title);
4438
if (matched_gh) {
4539
return {"kind": "github", "id": matched_gh[2]};
4640
}
4741
return null;
4842
}
4943

50-
/**
51-
* Retrieves information about a JIRA issue.
52-
* @param {String} jiraID
53-
* @returns {Object} the information about a JIRA issue.
54-
*/
55-
async function getJiraInfo(jiraID) {
56-
const jiraURL = `https://issues.apache.org/jira/rest/api/2/issue/${jiraID}`;
57-
58-
return new Promise((resolve) => {
59-
https.get(jiraURL, res => {
60-
let data = '';
61-
62-
res.on('data', chunk => { data += chunk })
63-
64-
res.on('end', () => {
65-
resolve(JSON.parse(data));
66-
})
67-
})
68-
});
69-
}
70-
7144
/**
7245
* Retrieves information about a GitHub issue.
7346
* @param {String} issueID

.github/workflows/dev_pr/issue_check.js

+1-90
Original file line numberDiff line numberDiff line change
@@ -17,91 +17,6 @@
1717

1818
const helpers = require("./helpers.js");
1919

20-
/**
21-
* Performs checks on the JIRA Issue:
22-
* - The issue is started in JIRA.
23-
* - The issue contains components.
24-
*
25-
* @param {Object} github
26-
* @param {Object} context
27-
* @param {String} pullRequestNumber
28-
* @param {String} jiraID
29-
*/
30-
async function verifyJIRAIssue(github, context, pullRequestNumber, jiraID) {
31-
const ticketInfo = await helpers.getJiraInfo(jiraID);
32-
if(!ticketInfo["fields"]["components"].length) {
33-
await commentMissingComponents(github, context, pullRequestNumber);
34-
}
35-
36-
if(ticketInfo["fields"]["status"]["id"] == 1) {
37-
// "status": {"name":"Open","id":"1"
38-
// "description":"The issue is open and ready for the assignee to start work on it.",
39-
await commentNotStartedTicket(github, context, pullRequestNumber);
40-
}
41-
}
42-
43-
/**
44-
* Adds a comment to add components on the JIRA ticket.
45-
*
46-
* @param {Object} github
47-
* @param {Object} context
48-
* @param {String} pullRequestNumber
49-
*/
50-
async function commentMissingComponents(github, context, pullRequestNumber) {
51-
const {data: comments} = await github.rest.issues.listComments({
52-
owner: context.repo.owner,
53-
repo: context.repo.repo,
54-
issue_number: pullRequestNumber,
55-
per_page: 100
56-
});
57-
58-
var found = false;
59-
for(var i=0; i<comments.length; i++) {
60-
if (comments[i].body.includes("has no components in JIRA")) {
61-
found = true;
62-
}
63-
}
64-
if (!found) {
65-
await github.rest.issues.createComment({
66-
owner: context.repo.owner,
67-
repo: context.repo.repo,
68-
issue_number: pullRequestNumber,
69-
body: ":warning: Ticket **has no components in JIRA**, make sure you assign one."
70-
});
71-
}
72-
}
73-
74-
/**
75-
* Adds a comment to start the ticket in JIRA.
76-
*
77-
* @param {Object} github
78-
* @param {Object} context
79-
* @param {String} pullRequestNumber
80-
*/
81-
async function commentNotStartedTicket(github, context, pullRequestNumber) {
82-
const {data: comments} = await github.rest.issues.listComments({
83-
owner: context.repo.owner,
84-
repo: context.repo.repo,
85-
issue_number: pullRequestNumber,
86-
per_page: 100
87-
});
88-
89-
var found = false;
90-
for(var i=0; i<comments.length; i++) {
91-
if (comments[i].body.includes("has not been started in JIRA")) {
92-
found = true;
93-
}
94-
}
95-
if (!found) {
96-
await github.rest.issues.createComment({
97-
owner: context.repo.owner,
98-
repo: context.repo.repo,
99-
issue_number: pullRequestNumber,
100-
body: ":warning: Ticket **has not been started in JIRA**, please click 'Start Progress'."
101-
});
102-
}
103-
}
104-
10520
/**
10621
* Assigns the GitHub Issue to the PR creator.
10722
*
@@ -164,10 +79,6 @@ module.exports = async ({github, context}) => {
16479
const title = context.payload.pull_request.title;
16580
const issue = helpers.detectIssue(title)
16681
if (issue){
167-
if (issue.kind == "jira") {
168-
await verifyJIRAIssue(github, context, pullRequestNumber, issue.id);
169-
} else if(issue.kind == "github") {
170-
await verifyGitHubIssue(github, context, pullRequestNumber, issue.id);
171-
}
82+
await verifyGitHubIssue(github, context, pullRequestNumber, issue.id);
17283
}
17384
};

.github/workflows/dev_pr/link.js

+1-29
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,6 @@ async function haveComment(github, context, pullRequestNumber, message) {
4747
return false;
4848
}
4949

50-
/**
51-
* Adds a comment on the Pull Request linking the JIRA issue.
52-
*
53-
* @param {Object} github
54-
* @param {Object} context
55-
* @param {String} pullRequestNumber
56-
* @param {String} jiraID
57-
*/
58-
async function commentJIRAURL(github, context, pullRequestNumber, jiraID) {
59-
const issueInfo = await helpers.getJiraInfo(jiraID);
60-
const jiraURL = `https://issues.apache.org/jira/browse/${jiraID}`;
61-
if (await haveComment(github, context, pullRequestNumber, jiraURL)) {
62-
return;
63-
}
64-
if (issueInfo){
65-
await github.rest.issues.createComment({
66-
owner: context.repo.owner,
67-
repo: context.repo.repo,
68-
issue_number: pullRequestNumber,
69-
body: jiraURL
70-
});
71-
}
72-
}
73-
7450
/**
7551
* Adds a comment on the Pull Request linking the GitHub issue.
7652
*
@@ -102,10 +78,6 @@ module.exports = async ({github, context}) => {
10278
const title = context.payload.pull_request.title;
10379
const issue = helpers.detectIssue(title);
10480
if (issue){
105-
if (issue.kind == "jira") {
106-
await commentJIRAURL(github, context, pullRequestNumber, issue.id);
107-
} else if (issue.kind == "github") {
108-
await commentGitHubURL(github, context, pullRequestNumber, issue.id);
109-
}
81+
await commentGitHubURL(github, context, pullRequestNumber, issue.id);
11082
}
11183
};

.github/workflows/dev_pr/title_check.md

-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ or
3131

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

34-
In the case of PARQUET issues on JIRA the title also supports:
35-
36-
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
37-
3834
See also:
3935

4036
* [Other pull requests](https://github.com/apache/arrow/pulls/)

CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ To be assigned to an issue, add a comment "take" to that issue.
2929

3030
Before you create a new bug entry, we recommend you first search among existing
3131
Arrow issues in
32-
[Jira](https://issues.apache.org/jira/issues/?jql=project%20%3D%20ARROW%20AND%20status%20%3D%20Open)
33-
or [GitHub](https://github.com/apache/arrow/issues).
32+
[GitHub](https://github.com/apache/arrow/issues).
3433

3534
We conventionally prefix the issue title with the component
3635
name in brackets, such as "[C++][Python] Ensure no validity bitmap in

dev/README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ you'll have to install Python dependencies yourself and then run
5151
The merge script requires tokens for access control. There are two options
5252
for configuring your tokens: environment variables or a configuration file.
5353

54-
> Note: Arrow only requires a GitHub token. Parquet can use GitHub or
55-
JIRA tokens.
54+
> Note: Arrow and Parquet only requires a GitHub token.
5655
5756
#### Pass tokens via Environment Variables
5857

@@ -61,12 +60,6 @@ The merge script uses the GitHub REST API. You must set a
6160
[Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
6261
You need to add `workflow` scope to the Personal Access Token.
6362

64-
You can specify the
65-
[Personal Access Token](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html)
66-
of your JIRA account in the
67-
`APACHE_JIRA_TOKEN` environment variable.
68-
If the variable is not set, the script will ask you for it.
69-
7063
#### Pass tokens via configuration file
7164

7265
```

dev/merge.conf.sample

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
# Configuration for the merge_arrow_pr.py tool
1919
# Install a copy of this file at ~/.config/arrow/merge.conf
2020

21-
[jira]
22-
# issues.apache.org Jira personal access token
23-
token=abc123
24-
2521
[github]
2622
# GitHub's personal access token. "workflow" scope is needed.
2723
api_token=ghp_ABC

0 commit comments

Comments
 (0)