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

Fixed label output #737

Merged
merged 2 commits into from
Feb 11, 2020
Merged

Fixed label output #737

merged 2 commits into from
Feb 11, 2020

Conversation

benndt
Copy link
Contributor

@benndt benndt commented Feb 11, 2020

Q A
Branch master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? no

With the taskId as key the label config gets overwriten by the last configuration

Test Setup:

    tasks:
        shell:
            scripts:
                - ['-c', 'echo', 'Running Task']
        shell_phpcs:
            metadata:
                label: 'Test'
                task: shell
            scripts:
            - ['-c', 'echo', 'test1']
        shell_phpmd:
            metadata:
                label: 'Hello'
                task: shell
            scripts:
                - ['-c', 'echo', 'test1']

Output with taskId:

Running task 1/3: Hello... ✔
Running task 2/3: Hello... ✔
Running task 3/3: Hello... ✔

Output with taskName:

Running task 1/3: shell... ✔
Running task 2/3: Test... ✔
Running task 3/3: Hello... ✔

@benndt benndt changed the title Use taskName for configuredTaskKey Fixed label output Feb 11, 2020
@benndt benndt requested a review from veewee February 11, 2020 15:11
@veewee veewee added this to the 0.18.0 milestone Feb 11, 2020
@veewee veewee added the bug label Feb 11, 2020
Copy link
Contributor

@veewee veewee left a comment

Choose a reason for hiding this comment

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

Thanks for testing and pointing out the issue!
Added a small question / improvement and then it's good to go!

@@ -45,7 +45,7 @@ public function process(ContainerBuilder $container): void
// Determine Keys:
$currentTaskService = $availableTasks[$currentTaskName];
['id' => $taskId, 'class' => $taskClass,] = $currentTaskService;
$configuredTaskKey = $taskId.'.configured';
$configuredTaskKey = $taskName.'.configured';
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to name it taskId.taskName.configured?
Just in case to make it clear which task is configured if somebody creates e.g. a phpunit alias for a shell task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea I added it!

@veewee veewee merged commit 690fdbe into phpro:master Feb 11, 2020
@veewee
Copy link
Contributor

veewee commented Feb 11, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants