-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Dev] Improve the link script to avoid extra comment #14790
Comments
For reference here are the docs with all available keywords: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
|
@assignUser I don't think we have to check for all those? We explicitly want to check for the addition of the bot, which will always be |
Ah I see, makes sense. I thought we would also check if the user has already added the keyword but I guess that's not really necessary as doubling the keyword doesn't have any negative consequences |
I never checked, but would |
Let me check the api docs, I know that there is no endpoint to link the issue but maybe that info is in the issue/pr object |
There is no "linked_pr|issue" field or something in the issue object and there also is no endpoint to link issues and prs... seems to be handled in some hidden way in the backend? |
Also, if we would check for "issue linked" through github APIs, we would still need to check that the issue number is correct and matching with the title (because you can easily type something like "this might also fix#xxx" or "this does not fix #xxx" in your top post, which creates such a link on github unintentionally). |
The PullRequest object has a |
### Rationale for this change We are duplicating the Closes issue_id comment on PRs adding it to both the PR body and a comment. There was some discussion to remove it from the comment. ### What changes are included in this PR? Remove adding extra comment to PR and check whether `Closes XXX` was already added on the body instead of checking comment. ### Are these changes tested? Yes, I have tested on my fork, see this PR: raulcd#79 ### Are there any user-facing changes? No * Closes: #14790 Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Describe the enhancement requested
Currently the link script used a dedicated comment to track that the link script had already run for that PR
https://github.com/apache/arrow/blob/master/.github/workflows/dev_pr/link.js#L86-L96
This is suboptimal because it leads to an extra comment, we could inspect the PR body/description itself for the
"Closes: X"
message instead of inspecting a comment.Component(s)
Developer Tools
The text was updated successfully, but these errors were encountered: