-
Notifications
You must be signed in to change notification settings - Fork 157
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
fix: add missing nop param for full-sync #733
base: main-enterprise
Are you sure you want to change the base?
Conversation
Nice! maybe you can update the readme too? |
Yes, I agree that updating the documentation would be beneficial. I think it would be more appropriate to create a separate PR for GHA documentation updates, as I'm planning to make other documentation improvements unrelated to this PR. But if updating GHA documentation in this current PR is required to merge it, I can update it. |
fd14365
to
ef70108
Compare
lib/env.js
Outdated
@@ -5,5 +5,6 @@ module.exports = { | |||
DEPLOYMENT_CONFIG_FILE: process.env.DEPLOYMENT_CONFIG_FILE || 'deployment-settings.yml', | |||
CREATE_PR_COMMENT: process.env.CREATE_PR_COMMENT || 'true', | |||
CREATE_ERROR_ISSUE: process.env.CREATE_ERROR_ISSUE || 'true', | |||
BLOCK_REPO_RENAME_BY_HUMAN: process.env.BLOCK_REPO_RENAME_BY_HUMAN || 'false' | |||
BLOCK_REPO_RENAME_BY_HUMAN: process.env.BLOCK_REPO_RENAME_BY_HUMAN || 'false', | |||
FULL_SYNC_NOOP: process.env.FULL_SYNC_NOOP === 'true' |
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.
We have different implementations for boolean environment variables.
For example, CREATE_PR_COMMENT
is handled as a string, while with this changes FULL_SYNC_NOP
is implemented as a boolean value. This is reflected in the different approaches in our unit tests.
I think it would be beneficial to standardize how we handle boolean environment variables across the project. Once we decide on the preferred implementation (string or boolean), I can create a new PR to refactor the existing code for consistency.
I can also update my changes to fit current implementation.
ef70108
to
8f2353e
Compare
Related to #378 (#378 (comment))
Now the full-sync script will use the new env var
FULL_SYNC_NOOP
and so run is noop mode if true.This helps run safe-settings GHA since you can add this var conditionaly based on event.
Example (based from https://github.com/UCL-MIRSG/.github/blob/4695e545829b91dcddc6e36358454bc4a879f751/.github/workflows/safe-settings.yaml thanks @paddyroddy) :