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

FIX Don't try to use option when it doesn't exist #61

Merged

Conversation

GuySartorelli
Copy link
Member

When running this command:

MS_GITHUB_TOKEN=my_token php run.php labels --only=gha-add-pr-to-project

I got the following error:

The "unsupported-default-branch" option does not exist.

Issue

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

This doesn't seem right

We use if ($input->getOption('dry-run')) { in multiple places already without the use of hasOption()

In run.php both options are defined the same

$optionDryRun = [
    'dry-run',
    null,
    InputOption::VALUE_NONE,
    'Do not push to github or create pull-requests'
];
// ...
$optionUnsupported = [
    'unsupported-default-branch',
    null,
    InputOption::VALUE_NONE,
    'Only update unsupported modules th...'
];

Update: ignore me, just realised this is for the labels command

@emteknetnz emteknetnz merged commit 32a5e3b into silverstripe:main Jun 17, 2024
1 check passed
@emteknetnz emteknetnz deleted the pulls/main/option-missing-bug branch June 17, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants