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

feat: Add support for ignoring specific repositories #97

Merged
merged 3 commits into from
Oct 24, 2022
Merged

Conversation

stefanbuck
Copy link
Member

@stefanbuck stefanbuck commented Oct 23, 2022

When using -R repo-owner/* octoherd will return all repositories within repo-owner. In certain circumstances you might want to ignore one or more repositories.

First I was thinking about another argument like --octoherd-ingore-repos, but this would require adding another prompt when using the interactive mode. Another idea was using a regex, but this can get quite complicated I think(from a user point of view)

Which leads to my preferred options, negating the existing repo argument by adding a leading exclamation mark like -R !repo-owner/repo-to-ignore. A full example would look like this

npx @octoherd/script-hello-world \
  --octoherd-token 0123456789012345678901234567890123456789 \
  -R 'repo-owner/*' \
  -R !repo-owner/repo-to-ignore`
  -R !repo-owner/another-repo-to-ignore`

This should (in theory) work quite well with the interactive mode as well.

Enter repositories: repo-owner/*, !repo-owner/repo-to-ignore

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

could you please update docs as well?

@stefanbuck
Copy link
Member Author

See description 😉

I still need to document this new feature ...

@stefanbuck
Copy link
Member Author

@gr2m I added remaining tests and documentation. Please have another look

@stefanbuck stefanbuck requested a review from gr2m October 24, 2022 20:26
Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@gr2m gr2m merged commit 49c6156 into main Oct 24, 2022
@gr2m gr2m deleted the feat-ignore-repo branch October 24, 2022 21:24
@github-actions
Copy link

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants