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

Feature: Branch-Protection: add support for release branches #445

Closed
laurentsimon opened this issue May 12, 2021 · 3 comments · Fixed by #554
Closed

Feature: Branch-Protection: add support for release branches #445

laurentsimon opened this issue May 12, 2021 · 3 comments · Fixed by #554
Assignees
Labels
kind/enhancement New feature or request

Comments

@laurentsimon
Copy link
Contributor

Currently we only check the default branch - which we assume is the dev branch.
We want to add protection for release branches. A bonus would be to verify the default branch has activity and is likely the dev branch.

@laurentsimon laurentsimon added the kind/enhancement New feature or request label May 12, 2021
@laurentsimon laurentsimon added this to the milestone-q2 milestone May 12, 2021
@laurentsimon laurentsimon changed the title Feature: Branch-Protectoin: add support for release branches Feature: Branch-Protection: add support for release branches May 12, 2021
@laurentsimon
Copy link
Contributor Author

An idea @jeffmendoza and I brainstormed today to identify branches that need branch protection is to list the releases and see which branch they points to.
This may require multiple API requests, though (1 for each different target_commitish) using this release API.

Example:

$ curl -isL  -H "Accept: application/vnd.github.v3+json"   https://api.github.com/repos/envoyproxy/envoy/releases | grep target_commitish
    "target_commitish": "release/v1.15",
    "target_commitish": "release/v1.16",
    "target_commitish": "release/v1.17",
    "target_commitish": "release/v1.18",
    "target_commitish": "main",
    "target_commitish": "main",
    "target_commitish": "main",
    "target_commitish": "release/v1.17",
    "target_commitish": "release/v1.16",
    "target_commitish": "release/v1.15",
    "target_commitish": "release/v1.14",
    "target_commitish": "release/v1.17",
    "target_commitish": "release/v1.13",
    "target_commitish": "master",
    "target_commitish": "release/v1.16",
    "target_commitish": "release/v1.15",
    "target_commitish": "release/v1.14",
    "target_commitish": "release/v1.13",
    "target_commitish": "release/v1.16",
    "target_commitish": "8fb3cb86082b17144a80402f5367ae65f06083bd",
    "target_commitish": "release/v1.15",
    "target_commitish": "release/v1.13",
    "target_commitish": "release/v1.15",
    "target_commitish": "release/v1.14",
    "target_commitish": "release/v1.13",
    "target_commitish": "release/v1.12",
    "target_commitish": "master",
    "target_commitish": "master",
    "target_commitish": "master",
    "target_commitish": "master",

@asraa
Copy link
Contributor

asraa commented Jun 4, 2021

I can try this :) Commenting in case that will allow assign-ability :P

@laurentsimon
Copy link
Contributor Author

yaaay... it worked! Thanks @asraa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants