Skip to content

Conversation

@timcrider
Copy link
Contributor

Build parameters are not always the first entry. Scanning for the appropriate hudson class will always yield appropriate parameters.

Adding the ability to fetch the Description and URL of a view, if the…
…ropriate hudson class will always yield appropriate parameters
// Parameters may not always be the first definition. Search for 'hudson.model.ParametersAction' to find
// real parameters.
foreach ($this->build->actions as $action) {
if (isset($action->_class) && $action->_class === 'hudson.model.ParametersAction') {
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need this condition ? With this one, I can't retrieve any parameters from my build (on jenkins 1.656)

Copy link
Member

Choose a reason for hiding this comment

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

I know we don't have tools to automatically check code style, but can you replace your tabs by 4 spaces as we follow psr2/3 (cf https://github.com/jenkins-khan/jenkins-php-api#coding-standards)

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