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

Create Protected branch plugin #2210

Merged
merged 3 commits into from Feb 4, 2023

Conversation

jBouyoud
Copy link
Contributor

@jBouyoud jBouyoud commented Jun 3, 2022

What Changed

New plugin to handle protected branch that enforce administrator enforcements.

Why

Todo: N/A

  • Add tests
  • Add docs

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major

@intuit-svc intuit-svc added the minor Increment the minor version when merged label Jun 3, 2022
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #2210 (80b635e) into main (3e1cd5c) will increase coverage by 0.15%.
The diff coverage is 93.84%.

@@            Coverage Diff             @@
##             main    #2210      +/-   ##
==========================================
+ Coverage   80.44%   80.60%   +0.15%     
==========================================
  Files          67       69       +2     
  Lines        5519     5584      +65     
  Branches     1292     1300       +8     
==========================================
+ Hits         4440     4501      +61     
  Misses        711      711              
- Partials      368      372       +4     
Impacted Files Coverage Δ
plugins/protected-branch/src/index.ts 89.74% <89.74%> (ø)
plugins/protected-branch/src/GitOperator.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91e0be2...80b635e. Read the comment docs.

@jBouyoud jBouyoud marked this pull request as ready for review June 3, 2022 14:22
@jBouyoud
Copy link
Contributor Author

@hipstersmoothie anything that I can do to help merge this PR ?

@Sy1v4in
Copy link

Sy1v4in commented Jan 13, 2023

Hello 👋
Any update on this PR? I've tried it on my project and it works perfectly 👌

{
name: this.name,
// Include this plugin in a high priority stage in order to be mostly often before others plugins
stage: -1,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even know this was a thing :O


// As reviewer, allowed in : `Restrict who can push to matching branches`
auto.logger.log.info("Mark released pr as reviewed ✅ ");
await gitOperator.approvePr(this.options.reviewerToken, prNumber, sha);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's clever. This is an impressive solution

Copy link
Collaborator

@hipstersmoothie hipstersmoothie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 Amazing job (sorry on the slow merge). This is a wonderful contribution..

@hipstersmoothie
Copy link
Collaborator

@jBouyoud Could you update the lock file?

@hipstersmoothie hipstersmoothie merged commit f713848 into intuit:main Feb 4, 2023
@hipstersmoothie
Copy link
Collaborator

🚀 PR was released in v10.38.0 🚀

@hipstersmoothie hipstersmoothie added the released This issue/pull request has been released. label Feb 4, 2023
@jBouyoud jBouyoud deleted the protected-branch-plugin branch February 6, 2023 12:20
@jBouyoud
Copy link
Contributor Author

jBouyoud commented Feb 6, 2023

🎉 Thanks

@jBouyoud
Copy link
Contributor Author

jBouyoud commented Feb 6, 2023

@hipstersmoothie I just realize that I've an improvement on my side that I not push here (do not rely on gh CLI and use auti Git class instead in order to remove a dependency and handle rate limits). I'll try to open a new PR for that.

I see that you have implemented a cleanup (to delete the branch) ; You also have to think that the branch could not exists anymore for people using Github built-in branch deletion after merge.

@hipstersmoothie
Copy link
Collaborator

Pr?

@jBouyoud jBouyoud mentioned this pull request Feb 8, 2023
6 tasks
@jBouyoud
Copy link
Contributor Author

jBouyoud commented Feb 8, 2023

Please find the mentioned PR here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants