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

Snippet-bot: support branch builds #5048

Open
nicain opened this issue May 4, 2023 · 3 comments
Open

Snippet-bot: support branch builds #5048

nicain opened this issue May 4, 2023 · 3 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@nicain
Copy link

nicain commented May 4, 2023

Internal googler here

cl/529194834 (xref b/278605884) added kokoro support for continuous branch builds based on regex. This unblocked adopting the Merge Queue github feature for kokoro-based Required checks. However, snippet-bot is not checking on these commits. (https://screenshot.googleplex.com/7WwabdGm8Yocd9J)

Can we add a branch-regex-based check option for snippetbot? That will get us one step closer for Merge Queue

@nicain nicain added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels May 4, 2023
@nicain nicain added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p3 Desirable enhancement or fix. May not be included in next release. labels May 4, 2023
@nicain
Copy link
Author

nicain commented May 4, 2023

Looks like we need to add a (app: Probot).on("push") filtered by a regex against a regex configured in the config file. Then a new function will be needed similar to scanPullRequest ("scanBranch" ?) will be needed, which builds from the result of Octokit.branch.

@chingor13
Copy link
Contributor

For scanning a PR, I don't see anything in the code restricting which base branch it runs against.

For the nightly scanning of the repo, that could be something that we add configuration for and run on multiple branches.

@nicain
Copy link
Author

nicain commented May 4, 2023

For scanning a PR, I don't see anything in the code restricting which base branch it runs against.

I agree! so it comes down to a question of triggering, right?

As best I can tell, GH Merge Queue (MQ) will create a branch conforming to the regex: gh-readonly-queue/main/pr-.* when the user presses the "Merge When Read" button (which replaces the "Squash and Merge" button, when MQ is activated on the branch)

This new branch adds a new commit to the PR feature branch, but I don't think it emits any events that the snippet-bot (scanning the PR) would be able to trigger on. Also, snippet-bot would need to figure out which commit (HEAD of the new regex-conforming branch) to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants