This is an automated email from the ASF dual-hosted git repository.
thisisnic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new f82dede3b2 GH-44817: [CI] Comment new repo url on issues of moved
components (#44818)
f82dede3b2 is described below
commit f82dede3b2316069d76f79f6e3663012d00a076f
Author: Jacob Wujciak-Jens <[email protected]>
AuthorDate: Tue Jan 13 10:54:40 2026 +0100
GH-44817: [CI] Comment new repo url on issues of moved components (#44818)
### Rationale for this change
Point people to the correct repo.
### What changes are included in this PR?
- Add a comment with link to new repo
- Do not add Component labels to issue
### Are these changes tested?
I tested it on my fork: https://github.com/assignUser/arrow/issues/23
### Are there any user-facing changes?
No
* GitHub Issue: #44817
Lead-authored-by: Jacob Wujciak-Jens <[email protected]>
Co-authored-by: Nic Crane <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Nic Crane <[email protected]>
---
.github/workflows/issue_bot.yml | 44 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/issue_bot.yml b/.github/workflows/issue_bot.yml
index 1b25c008ab..092c154b64 100644
--- a/.github/workflows/issue_bot.yml
+++ b/.github/workflows/issue_bot.yml
@@ -24,17 +24,33 @@ on:
permissions:
contents: read
- issues: write
jobs:
label_components:
name: Label Components
if: github.event.issue.pull_request == null
runs-on: ubuntu-latest
+ permissions:
+ issues: write
steps:
- uses: actions/github-script@v8
with:
script: |
+ const moved_repos = {
+ "Go": "arrow-go",
+ "Java": "arrow-java",
+ "JavaScript": "arrow-js",
+ "Julia": "arrow-julia",
+ "Rust": "arrow-rs",
+ "Swift": "arrow-swift",
+ "C#": "arrow-dotnet",
+ "DataFusion": "datafusion",
+ };
+
+ let repo_moved_msg = (component, repo) =>
+ `Thanks for your report! The ${component} implementation has
moved to https://github.com/apache/${repo}.\n\n` +
+ `This issue has been closed automatically - please open a new
issue there.`;
+
let split_body = context.payload.issue.body.split('###
Component(s)');
if (split_body.length != 2) throw new Error('No components
found!');
@@ -52,10 +68,28 @@ jobs:
label => !label.startsWith("Component: ")
);
- let component_labels = split_body[1]
+ let components = split_body[1]
.split(',')
- .map(component => component.trim())
- .map(component => "Component: " + component);
+ .map(component => component.trim());
+ let moved_component = components.find(comp => comp in moved_repos);
+
+ if (moved_component) {
+ await github.rest.issues.createComment({
+ "owner": context.repo.owner,
+ "repo": context.repo.repo,
+ "issue_number": context.payload.issue.number,
+ "body": repo_moved_msg(moved_component,
moved_repos[moved_component]),
+ });
+ await github.rest.issues.update({
+ "owner": context.repo.owner,
+ "repo": context.repo.repo,
+ "issue_number": context.payload.issue.number,
+ "state": "closed",
+ });
+ return;
+ }
+
+ let component_labels = components.map(component => "Component: " +
component);
let repo_labels = await github.rest.issues.listLabelsForRepo({
"owner": context.repo.owner,
@@ -67,7 +101,7 @@ jobs:
component_labels = component_labels.filter(
label => repo_labels.data.some(repo_label => repo_label.name ===
label)
);
-
+
if (component_labels.length == 0) throw new Error('No components
found!');
await github.rest.issues.setLabels({