Skip to content

fix: #124 exclude pull requests of archived repositories#199

Merged
dlvhdr merged 2 commits intodlvhdr:mainfrom
yokishava:fix/exclude-archived-repository-pr
Nov 14, 2022
Merged

fix: #124 exclude pull requests of archived repositories#199
dlvhdr merged 2 commits intodlvhdr:mainfrom
yokishava:fix/exclude-archived-repository-pr

Conversation

@yokishava
Copy link
Contributor

@yokishava yokishava commented Nov 10, 2022

Summary

I have seen this issue. I added a change to exclude PRs in archived repositories.

#124

I would have liked to be able to remove PRs from archived repositories in the Github API arguments, but after checking the documentation I found it difficult to do so. I have added an implementation to remove pull requests from archived repositories after fetching pull requests.

How did you test this change?

I wrote unit tests for the added functions.

I ran the command gh dash to see if it was successful in removing pull requests from archived repositories.

I used this archived repository.
https://github.com/yokishava/k8s-manifest-ci-demo

Images/Videos

before

スクリーンショット 2022-11-11 1 47 38

after

スクリーンショット 2022-11-11 1 48 08

@yokishava yokishava changed the title fix: exclude pull requests of archived repositories fix: #124 exclude pull requests of archived repositories Nov 10, 2022
Copy link
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great! For a lack of a better solution from github, this is the best we can do.

Comment on lines +21 to +24
Repository: struct {
NameWithOwner string
IsArchived bool
}{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you extract the struct type to a type variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for review! I fixed it, is that ok?

d34c2aa

@dlvhdr dlvhdr merged commit fb8350b into dlvhdr:main Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants