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

Remove the check and warning for master branch usage #311

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@ protected function configure(): void
$extra = getenv('EXTRA_PLUGINS_DIR') !== false ? getenv('EXTRA_PLUGINS_DIR') : null;
$node = getenv('NODE_VERSION') !== false ? getenv('NODE_VERSION') : null;

// Emit a warning/annotation under GHA if the branch is master (recommending to move to main).
// @codeCoverageIgnoreStart
if (getenv('GITHUB_ACTIONS')) { // Only show annotations in GitHub Actions.
if ($branch === 'master') { // And only if the branch being used is master.
echo '::warning title=`master` branch use detected::The `master` branch of Moodle has been ' .
'moved to `main` and will stop working soon. Please consider moving to `main` in your ' .
'workflows. Ref.: MDLSITE-7418' . PHP_EOL;
}
}
// @codeCoverageIgnoreEnd

// As there is not only Travis CI, it can also be passed a generic environment variable.
if (null === $plugin) {
$plugin = getenv('CI_BUILD_DIR') !== false ? getenv('CI_BUILD_DIR') : null;
Expand Down
Loading