-
-
Notifications
You must be signed in to change notification settings - Fork 413
Feature: Comment on released PRs and issues #80
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
Open
ayshiff
wants to merge
8
commits into
changesets:main
Choose a base branch
from
ayshiff:feature/release-comment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
032cc94
feat(core): comment on released pulls-issues
ayshiff 4cf0d4f
fix(core): update dist/index
ayshiff 16cc5c3
fix(core): getSearchQueries separator length
ayshiff 0246148
fix(core): comment only on root release
ayshiff 7eb2672
fix(action): add comment input
ayshiff 648245a
fix(run): format + comment on monorepos
ayshiff 877fca3
fix(run): missing return in Promise.all
ayshiff 91daffb
feat(run): changesets based comment
ayshiff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
q: in the GitHub interface we have "Linked issues", I assume that this list is received by their frontend from their backend and that they don't have to prepare the PR body to get that. Would it be possible to leverage that? Or are there some limitations regarding this technique? One thing that comes to my mind - the list might include more than we want but maybe it's associated with some metadata that we could leverage to filter that list?
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.
I agree with you, I wish I had found a more appropriate solution but I think we don't have the necessary information in the API response (see https://docs.github.com/en/rest/reference/pulls#get-a-pull-request).
I tried with a Pull Request that has several related issues and they don't appear in the API response.
Uh oh!
There was an error while loading. Please reload this page.
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.
There seems to be an indirect way using the GraphQL API: https://github.community/t/get-all-issues-linked-to-a-pull-request/14653/6
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.
This doc also claims that it's possible to query that ingo using filters: https://docs.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-for-linked-issues-and-pull-requests
But I couldn't make it work to get actual issue numbers.
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.
got a little closer, but not quite. using this query, I was able to get the PR referenced from a referenced issue, but not the referenced issue itself 😆 ...
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.
This can now be queried with:
{ resource(url: "https://github.com/graphql/graphiql/pull/1914") { ... on PullRequest { closingIssuesReferences(first: 99) { nodes { number } } } } }I will be revamping this PR this week to hopefully land it before the end of the year.