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

GitHub: Automatic branch protection from repository rules #182488

Closed
3 tasks done
lszomoru opened this issue May 15, 2023 · 5 comments
Closed
3 tasks done

GitHub: Automatic branch protection from repository rules #182488

lszomoru opened this issue May 15, 2023 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality github Github extension verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@lszomoru
Copy link
Member

lszomoru commented May 15, 2023

  • Switch to using GraphQL instead of REST
  • Rework the authentication flow to be more subtle
  • Enable feature by default
@lszomoru lszomoru added feature-request Request for new features or functionality github Github extension labels May 15, 2023
@lszomoru lszomoru added this to the May 2023 milestone May 15, 2023
@lszomoru lszomoru self-assigned this May 15, 2023
@lszomoru lszomoru modified the milestones: May 2023, June 2023 May 24, 2023
@joaomoreno
Copy link
Member

joaomoreno commented Jun 8, 2023

Currently GitHub still hasn't rolled out contributor access to the ruleset API, waiting of them to roll that out.

Next steps before enabling by default:

  • Have the branch protection detection use silent: true so users aren't shown a badge
  • Detect failed pushes and drive users to enable the setting, maybe some "Learn More" link

@joaomoreno joaomoreno changed the title GitHub - polish branch protection before enablement GitHub: Automatic branch protection from repository rules Jun 12, 2023
@lszomoru
Copy link
Member Author

Since we cannot differentiate between a failed push due to a branch protection rule and a failed push due to a repository ruleset, we will use "may" verbiage in the dialog. Apart from the "Learn More" link, we will also provide an action for the user to sign in with their GitHub account.

@lszomoru
Copy link
Member Author

Pushing to next milestone as we are still waiting for the API permission changes to be rolled out broadly.

@lszomoru
Copy link
Member Author

Feature has been enabled by default. If users are signed in with their GitHub identities and are using repository rulesets we will pull that information and we will display branch protection affordances in the UI (status bar, commit action button).

@lszomoru
Copy link
Member Author

Verification steps:

  1. Sign out from your GitHub account in VS Code
  2. Start VS Code with all the extension disabled (you can use a profile for this)
  3. Open a folder/workspace that contains a git repository hosted on GitHub (ex: microsoft/vscode)
    • Confirm that the "Account" icon in the sidebar does not show a badge asking for authentication

@lszomoru lszomoru added the verification-needed Verification of issue is requested label Jul 18, 2023
@alexr00 alexr00 added the verified Verification succeeded label Jul 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality github Github extension verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants