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

Filter PRs which can not be updated #16

Closed
Bullrich opened this issue Apr 10, 2024 · 0 comments · Fixed by #17
Closed

Filter PRs which can not be updated #16

Bullrich opened this issue Apr 10, 2024 · 0 comments · Fixed by #17
Assignees
Labels
bug Something isn't working

Comments

@Bullrich
Copy link
Contributor

Some PRs, like PRs that are already up to date or that don't have permission to be modified by contributors should be skipped.

For that we will have to migrate the scripts to work with graphql as it has a helper method: viewerCanUpdateBranch.

This informs the viewer if they have the power to update a branch. It's false if the branch is already up-to-date or if the user doesn't not have permission to do so.

@Bullrich Bullrich self-assigned this Apr 10, 2024
@Bullrich Bullrich added the bug Something isn't working label Apr 10, 2024
@Bullrich Bullrich linked a pull request Apr 10, 2024 that will close this issue
Bullrich added a commit that referenced this issue Apr 10, 2024
Resolves #16

- Added Graphql implementation to get `viewerCanUpdateBranch` field.
  - Filtered PRs which have this value false
- Implemented [`GraphQL-Codegen`](https://the-guild.dev/graphql/codegen)
- Updated types to be extracted from `@octokit/graphql-schema` and
auto-generated.
- The type that implements this looks messy because all the nested
objects are nullable
  - Added utility to copy `graphql` files into raw strings
- Updated version to `0.2.1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant