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

Additional func to retrieve default branch of an org/repo #393

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deepsm007
Copy link
Contributor

@deepsm007 deepsm007 commented Mar 5, 2025

Changes:

  • Added a new createOrUpdatePROnDefaultBranch function to fetch a repo's default branch and update the PR
  • Added unit tests to cover both success and error cases.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 5, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @deepsm007. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot requested a review from krzyzacy March 5, 2025 15:40
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepsm007
Once this PR has been reviewed and has the lgtm label, please assign krzyzacy for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from smg247 March 5, 2025 15:40
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 5, 2025
Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit 3bea76d
🔍 Latest deploy log https://app.netlify.com/sites/k8s-prow/deploys/67d36371043e6c00082e7355
😎 Deploy Preview https://deploy-preview-393--k8s-prow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@deepsm007 deepsm007 force-pushed the bumper branch 3 times, most recently from 0f6df51 to 5de343e Compare March 6, 2025 17:17
@petr-muller
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 6, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2025
@deepsm007 deepsm007 force-pushed the bumper branch 2 times, most recently from 1b00c71 to 99737eb Compare March 13, 2025 21:42
@k8s-ci-robot k8s-ci-robot added the area/hook Issues or PRs related to prow's hook component label Mar 13, 2025
@k8s-ci-robot
Copy link
Contributor

@deepsm007: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-prow-unit-test-race-detector-nonblocking 3bea76d link false /test pull-prow-unit-test-race-detector-nonblocking
pull-prow-unit-test 3bea76d link true /test pull-prow-unit-test
pull-prow-verify-lint 3bea76d link true /test pull-prow-verify-lint
pull-prow-integration 3bea76d link true /test pull-prow-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@smg247
Copy link
Contributor

smg247 commented Mar 14, 2025

I would stop trying to use the fakegithubclient for the purpose of this unit test. If you follow this example to define a new interface in bumper for only the ghc methods it actually needs then you can just mock those methods with a fake client of your own. They have done this exact thing in branchprotector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hook Issues or PRs related to prow's hook component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants