-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
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."; |
There was a problem hiding this comment.
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}.` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)); |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("blub") |
Rationale for this change
Point people to the correct repo.
What changes are included in this PR?
Are these changes tested?
I tested it on my fork: assignUser#23
Are there any user-facing changes?
No