-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat(github-actions): create a unified status action #912
Conversation
Create a github action which tracks all of the statuses on a pull request to create a unified status value.
c48c144
to
d50d112
Compare
]); | ||
|
||
/** GraphQL schema for requesting the status information for a given pull request. */ | ||
const PR_SCHEMA = params( |
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.
isn't all of this similar in ng-dev? can we just use that from there or dedupe?
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.
We could, but to do so we would have to use the AuthenticatedGithubApi
class that is in ng-dev
, which is more complicated because of the access to the configuration files.
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.
The client does not depend on configs AFAIK: https://github.com/angular/dev-infra/blob/main/ng-dev/utils/git/github.ts
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 was thinking of the AuthenticatedGitClient
rather than the Github one. Will see what I can do.
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.
From looking into it more, we can leverage the ng-dev stuff, but we don't really save ourselves that much code since we still have to describe what the shape of the PR response we want is.
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 thought we are already using a similar schema (almost identical, maybe with a bit more stuff). If that's not the case, then yes. I'm fine keeping it here. Maybe want to extract it into a separate file for more readability? it's odd having this at the end of a file too (not relying on hoisting for better readability)
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 will do the refactor into another file in a follow up because I want to expand a bit of what its doing and I would rather land this as is for now.
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.
no worries, sgtm
189aca3
to
98ab722
Compare
5856156
to
9c78f39
Compare
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.
LGTM. some minor suggestions, but nice work!
]); | ||
|
||
/** GraphQL schema for requesting the status information for a given pull request. */ | ||
const PR_SCHEMA = params( |
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 thought we are already using a similar schema (almost identical, maybe with a bit more stuff). If that's not the case, then yes. I'm fine keeping it here. Maybe want to extract it into a separate file for more readability? it's odd having this at the end of a file too (not relying on hoisting for better readability)
This PR was merged into the repository by commit 856c3ab. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Create a github action which tracks all of the statuses on a pull request to create a unified status value.