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): OwlBot to report a skip in pull request checks #5643

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Dec 23, 2024

  • fix: OwlBot postprocessor to report a check when skipping a PR

b/385183332. After #5587 and before this change, the post processor checks were silently skipped and those repositories that mark it as required cannot merge pull requests from external contributors.


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

OwlBot postprocessor has stopped running the script since
googleapis#5587.
Many repositories mark the postprocessor check as required.
This change reports the check status as success with a message
that indicates the execution was skipped.
@suztomo
Copy link
Member Author

suztomo commented Dec 27, 2024

"packages-owl-bot-test (repo-automation-bots) Failing after 1s — Summary" says:

Your build failed to run: generic::invalid_argument: if 'build.service_account' is specified, the build must either (a) specify 'build.logs_bucket', (b) use the REGIONAL_USER_OWNED_BUCKET build.options.default_logs_bucket_behavior option, or (c) use either CLOUD_LOGGING_ONLY / NONE logging options

trigger

@suztomo
Copy link
Member Author

suztomo commented Dec 27, 2024

All checks have passed

@suztomo suztomo requested a review from chingor13 January 3, 2025 00:10
packages/owl-bot/src/owl-bot.ts Outdated Show resolved Hide resolved
@@ -615,14 +615,6 @@ const runPostProcessor = async (
logger: GCFLogger,
breakLoop = true
) => {
// If the pull request is from a fork and not from allowlist, skip.
Copy link
Member Author

Choose a reason for hiding this comment

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

Moving this logic after the declaration of createCheck.

Copy link
Member Author

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

@chingor13 PTAL

text: 'Ignored by Owl Bot because the pull request was created from a fork. See go/owlbot-skip-forks.',
summary:
'Ignored by Owl Bot because the pull request was created from a fork',
conclusion: 'skipped',
Copy link
Member Author

Choose a reason for hiding this comment

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

Now it's skipped.

@suztomo suztomo marked this pull request as ready for review January 4, 2025 04:05
@suztomo suztomo requested a review from a team as a code owner January 4, 2025 04:05
@suztomo suztomo merged commit c9fc622 into googleapis:main Jan 6, 2025
16 checks passed
@suztomo suztomo deleted the owlbot_postprocessor_skip branch January 6, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants