Skip to content
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

GH-44817: [CI] Comment new repo url on issues of moved components #44818

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

assignUser
Copy link
Member

@assignUser assignUser commented Nov 23, 2024

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: assignUser#23

Are there any user-facing changes?

No

Copy link

⚠️ GitHub issue #44817 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added the awaiting review Awaiting review label Nov 23, 2024
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Nov 23, 2024
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
let repo_moved_msg = component => `The ${component} implementation has moved to https://github.com/apache/arrow-${component}.` +
"\nPlease close this one and open your issue there.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that \n didn't work: assignUser#23 (comment)

steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
let repo_moved_msg = component => `The ${component} implementation has moved to https://github.com/apache/arrow-${component}.` +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let repo_moved_msg = component => `The ${component} implementation has moved to https://github.com/apache/arrow-${component}.` +
let repo_moved_msg = component => `The ${component} implementation has moved to https://github.com/apache/arrow-${component.toLowerCase}.` +

.map(component => component.trim());
let moved_components = components.filter(comp => ["Go"].includes(comp));

if (moved_components.length != 0){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (moved_components.length != 0){
if (moved_components.length != 0) {

.map(component => component.trim())
.map(component => "Component: " + component);
.map(component => component.trim());
let moved_components = components.filter(comp => ["Go"].includes(comp));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using find not filter because this only uses the first found component?

"issue_number": context.payload.issue.number,
"body": repo_moved_msg(moved_components[0]),
});
console.log("blub")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log("blub")

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes Awaiting changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants