GithubHelp home page GithubHelp logo

Comments (2)

stephanme avatar stephanme commented on June 27, 2024

Idea is to surround the branch inclusion patterns by ^...$ to get a full branch name match.

#581 will test this on https://github.com/cloudfoundry/branchprotection-test. Once merged, I will create test branches similar to the ones listed above which should not be touched anymore. If it works as expected, I adapt the org automation.

from community.

stephanme avatar stephanme commented on June 27, 2024

Test #581 succeeded. I created a few test branches on repo branchprotection-test similar to the problematic ones on cf-deployment and the remained unprotected after an org automation run:

https://github.com/cloudfoundry/community/actions/runs/4694888643/jobs/8323476572

...
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"GetRepo(cloudfoundry, branchprotection-test)","severity":"info","time":"2023-04-14T06:36:00Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"GetBranches(cloudfoundry, branchprotection-test, false)","severity":"info","time":"2023-04-14T06:36:01Z"}
{"component":"branchprotector","file":"k8s.io/test-infra/prow/cmd/branchprotector/protect.go:329","func":"main.(*protector).UpdateRepo","level":"info","msg":"cloudfoundry/branchprotection-test=develop: not included","severity":"info","time":"2023-04-14T06:36:01Z"}
{"component":"branchprotector","file":"k8s.io/test-infra/prow/cmd/branchprotector/protect.go:329","func":"main.(*protector).UpdateRepo","level":"info","msg":"cloudfoundry/branchprotection-test=manual_merge_stemcell_update_from_main: not included","severity":"info","time":"2023-04-14T06:36:01Z"}
{"component":"branchprotector","file":"k8s.io/test-infra/prow/cmd/branchprotector/protect.go:329","func":"main.(*protector).UpdateRepo","level":"info","msg":"cloudfoundry/branchprotection-test=stephanme-patch-1: not included","severity":"info","time":"2023-04-14T06:36:01Z"}
{"component":"branchprotector","file":"k8s.io/test-infra/prow/cmd/branchprotector/protect.go:329","func":"main.(*protector).UpdateRepo","level":"info","msg":"cloudfoundry/branchprotection-test=test: not included","severity":"info","time":"2023-04-14T06:36:01Z"}
{"component":"branchprotector","file":"k8s.io/test-infra/prow/cmd/branchprotector/protect.go:329","func":"main.(*protector).UpdateRepo","level":"info","msg":"cloudfoundry/branchprotection-test=update-cf-cli-release-v1.43.0: not included","severity":"info","time":"2023-04-14T06:36:01Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"GetBranches(cloudfoundry, branchprotection-test, true)","severity":"info","time":"2023-04-14T06:36:01Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"GetBranchProtection(cloudfoundry, branchprotection-test, main)","severity":"info","time":"2023-04-14T06:36:01Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"GetBranchProtection(cloudfoundry, branchprotection-test, v1)","severity":"info","time":"2023-04-14T06:36:01Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"UpdateBranchProtection(cloudfoundry, branchprotection-test, main, {\"required_status_checks\":null,\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":1,\"bypass_pull_request_allowances\":{\"users\":[],\"teams\":[\"wg-app-runtime-deployments-bots\"]}},\"restrictions\":null,\"required_linear_history\":false,\"allow_force_pushes\":false,\"allow_deletions\":false})","severity":"info","time":"2023-04-14T06:36:01Z"}
{"client":"github","component":"branchprotector","file":"k8s.io/test-infra/prow/github/client.go:918","func":"k8s.io/test-infra/prow/github.(*client).log","level":"info","msg":"UpdateBranchProtection(cloudfoundry, branchprotection-test, v1, {\"required_status_checks\":null,\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":1,\"bypass_pull_request_allowances\":{\"users\":[],\"teams\":[\"wg-app-runtime-deployments-bots\"]}},\"restrictions\":null,\"required_linear_history\":false,\"allow_force_pushes\":false,\"allow_deletions\":false})","severity":"info","time":"2023-04-14T06:36:01Z"}
...

I will file a PR to adapt the org automation coding to generate branch protection include patterns surrounded by ^...$.

from community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.