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

[CI] Allow auto to push on protected branch #261

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

alyssadai
Copy link
Contributor

@alyssadai alyssadai commented Dec 19, 2023

Changes proposed in this pull request:

Here's my attempt at using the protected-branch plugin, based on these docs 🤷

I also added the first-time-contributor plugin since I was updating the list anyways 🙈

Checklist

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see https://neurobagel.org/contributing/pull_requests for more info)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cbcf381) 97.90% compared to head (33d830e) 97.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #261   +/-   ##
=======================================
  Coverage   97.90%   97.90%           
=======================================
  Files          13       13           
  Lines         717      717           
=======================================
  Hits          702      702           
  Misses         15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@surchs
Copy link
Contributor

surchs commented Dec 19, 2023

Cool PR, thanks @alyssadai! The docs also say that we have to install this plugin first because it is not part of the npm install: https://github.com/intuit/auto/tree/main/plugins/protected-branch#installation Then again, we are not installing via npm, we just get the whole release bundle. So it may or may not work - hard to tell.

Would you like to be the first to try out https://github.com/nektos/act and run your proposed workflow setup locally to test? I was planning to look into this tool so that I don't have to keep making senseless pushes to the workflow dir every time we try to add a new workflow there - this looks like the best tool for that

@surchs surchs self-requested a review December 19, 2023 14:51
@coveralls
Copy link
Collaborator

coveralls commented Dec 19, 2023

Pull Request Test Coverage Report for Build 7271907033

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.701%

Totals Coverage Status
Change from base Build 7268081703: 0.0%
Covered Lines: 1336
Relevant Lines: 1340

💛 - Coveralls

@alyssadai
Copy link
Contributor Author

alyssadai commented Dec 20, 2023

Thanks for the suggestion @surchs!

I've tried it out locally and documented my findings in our wiki.

As described in the limitations I noticed, given the current context restrictions we've set up for when a release is actually initiated / published (on release label, on main push ...), I think act likely will not be able to sufficiently run the release process to completion in a local environment.

That said, I've confirmed by looking at the local job log that the protected-branch plugin does seem to be found + used, even though we don't npm install it:

...
| ℹ  info      Found plugin using: /snapshot/auto/packages/core/dist/plugins/filter-non-pull-request.js
| ℹ  info      Found plugin using: /snapshot/auto/packages/core/dist/plugins/filter-non-pull-request.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/git-tag/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/git-tag/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/released/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/released/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/protected-branch/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/protected-branch/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/first-time-contributor/dist/index.js
| ℹ  info      Found plugin using: /snapshot/auto/plugins/first-time-contributor/dist/index.js
| ℹ  info      Using Filter Non Pull Request Plugin...
| ℹ  info      Using git-tag Plugin...
| ℹ  info      Using released Plugin...
| ℹ  info      Using protected-branch Plugin...
| ℹ  info      Using first-time-contributor Plugin...
| https://github.com/neurobagel/bagel-cli.git
| ℹ  info      Options contain repo information.
| ℹ  info      Initializing GitHub API with:
...

so I think we can go ahead and merge this PR! Please approve if you agree :)

Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

awesome, thanks a lot @alyssadai 🎉 this is going to be very useful across the repos

@alyssadai alyssadai merged commit 4a333c6 into main Dec 20, 2023
9 checks passed
@alyssadai alyssadai deleted the allow-auto-on-protected-branch branch December 20, 2023 16:36
@alyssadai alyssadai added release Create a release when this PR is merged and removed release Create a release when this PR is merged labels Dec 20, 2023
@surchs
Copy link
Contributor

surchs commented Jan 8, 2024

🚀 PR was released in v0.2.1 🚀

@surchs surchs added the released This issue/pull request has been released. label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add plugin to allow auto-release on protected branch
4 participants