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

fix(owl-bot): ignore non-cloud php repos #5286

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/owl-bot/src/should-ignore-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export function shouldIgnoreRepo(ownerSlashRepo: string): boolean {
// subdirectories of google-cloud-php and never accept pull requests.
const regexp = process.env.IGNORE_REPO_REGEXP
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like these should always be ignored, not only if they're not explicitly specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think is an override for tests/testing environments and we use the default in production

? new RegExp(process.env.IGNORE_REPO_REGEXP)
: /googleapis\/(googleapis(-gen)?|google-cloud-php-.+)/;
: /googleapis\/(googleapis(-gen)?|google-cloud-php-.+|php-.+)/;
return regexp.test(ownerSlashRepo);
}
3 changes: 3 additions & 0 deletions packages/owl-bot/test/should-ignore-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ describe('shouldIgnoreRepo', () => {
it('ignores PHP sharded repo', () => {
assert.ok(shouldIgnoreRepo('googleapis/google-cloud-php-asset'));
});
it('ignores non-cloud PHP sharded repo', () => {
assert.ok(shouldIgnoreRepo('googleapis/php-shopping-merchant-reports'));
});
it("doesn't ignore PHP root repo", () => {
assert.ok(!shouldIgnoreRepo('googleapis/google-cloud-php'));
});
Expand Down
Loading