Skip to content

Commit

Permalink
Merge pull request #311 from junpataleta/master2main
Browse files Browse the repository at this point in the history
Remove the check and warning for master branch usage
  • Loading branch information
kabalin authored Aug 13, 2024
2 parents 3842ad1 + 4360ee3 commit a498ec7
Showing 1 changed file with 0 additions and 11 deletions.
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

0 comments on commit a498ec7

Please sign in to comment.