-
Notifications
You must be signed in to change notification settings - Fork 3k
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 isStagingDeployLocked action #1683
Conversation
Okay, this isn't working because I (foolishly!) forgot that we can't use ES6 modules in a Node.js script using the CJS module system. I knew that I was going to forget and this was going to happen... Anyways, I'm going to put together a PR to port over the ES6 |
This needs to be HELD on #1690 |
# Conflicts: # .github/scripts/buildActions.sh
Okay, this is well-tested and ready for review |
const githubUtils = new GithubUtils(octokit); | ||
|
||
githubUtils.getStagingDeployCash() | ||
.then(({labels}) => core.setOutput('IS_LOCKED', _.contains(_.pluck(labels, 'name'), '🔐 LockCashDeploys 🔐'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not totally required to switch, but why make this it's own action when we could use something already built like: https://github.com/marketplace/actions/github-api-request ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah is it because this needs getStagingDeployCash()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's just to take advantage of the code we've already built for fetching the open StagingDeployCash
Tests seem good. But I'm confused by |
@Julesssss from the GH Actions docs:
So we had a few options:
We've opted for (3) |
FYI conflicts |
# Conflicts: # tests/unit/GithubUtilsTest.js
Merge conflicts resolved! |
Thanks for explaining! Tough choice, no option is great 😞 |
LGTM. Will let Andrew approve and merge. |
Details
Creates an action to check if the StagingDeployCash is locked.
Fixed Issues
Fixes (partial) https://github.com/Expensify/Expensify/issues/155140
Tests
StagingDeplyCash
. It should output "false" by default. ✅ https://github.com/Expensify/Expensify.cash/pull/1683/checks?check_run_id=2081644255StagingDeployCash
label in Expensify.cash ✅ Test StagingDeployCash #1712🔐 LockCashDeploys 🔐
label on the testStagingDeployCash
✅Tested On
Github