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

feat: ✨ add new command 'm365 pp pipeline list' to list Powe… #6434

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DevPio
Copy link

@DevPio DevPio commented Oct 17, 2024

Closes #6287

@milanholemans
Copy link
Contributor

Thank you @DevPio m, we'll try to review it ASAP!

@Adam-it Adam-it added the hacktoberfest-accepted Accept for hacktoberfest, will merge later label Oct 29, 2024
@Adam-it
Copy link
Member

Adam-it commented Oct 29, 2024

@DevPio I added the hacktoberfest-accepted label to this PR which means that this PR will count as done for the Hacktoberfest event. So if you participate in this event it will get you unblocked and it allows us to merge this PR later when we catch up 👍
Thanks for your support and awesome contribution 👏 You Rock 🤩

@martinlingstuyl martinlingstuyl self-assigned this Jan 2, 2025
Copy link
Contributor

@martinlingstuyl martinlingstuyl left a comment

Choose a reason for hiding this comment

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

Hi @DevPio, I've reviewed your PR, let's fix some issues before we move on!

docs/docs/cmd/pp/pipeline/pipeline-list.mdx Outdated Show resolved Hide resolved
src/m365/pp/commands.ts Outdated Show resolved Hide resolved
docs/src/config/sidebars.ts Outdated Show resolved Hide resolved
docs/src/config/sidebars.ts Outdated Show resolved Hide resolved
src/m365/pp/commands/pipeline/pipeline-list.ts Outdated Show resolved Hide resolved
src/m365/pp/commands/pipeline/pipeline-list.ts Outdated Show resolved Hide resolved
src/m365/pp/commands/pipeline/pipeline-list.ts Outdated Show resolved Hide resolved
src/m365/pp/commands/pipeline/pipeline-list.ts Outdated Show resolved Hide resolved
src/m365/pp/commands/pipeline/pipeline-list.spec.ts Outdated Show resolved Hide resolved
@martinlingstuyl martinlingstuyl marked this pull request as draft January 8, 2025 20:03
@DevPio DevPio marked this pull request as ready for review January 11, 2025 20:00
@DevPio
Copy link
Author

DevPio commented Jan 14, 2025

@martinlingstuyl everything looks good to me. If you notice any other issues, feel free to let me know

Copy link
Contributor

@martinlingstuyl martinlingstuyl left a comment

Choose a reason for hiding this comment

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

Hi @DevPio! I've looked through the files. We're getting there. Let's fix a last couple of things before we merge this.


## Options

`-e, --environmentName <environment>`
Copy link
Contributor

Choose a reason for hiding this comment

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

You're missing the line ```md definition-list above this line. Do compare with other mdx files to see. And if you want you can build the docs and serve them locally to see if the page looks correctly...


`--asAdmin`
: Run the command as admin and retrieve pipelines from environments you do not have explicitly assigned permissions to.

Copy link
Contributor

Choose a reason for hiding this comment

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

A closing ``` is necessary just below the last option and before the <Global/> component

```

</TabItem>

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove superfluous line breaks like this one.

}

public get description(): string {
return 'Lists Microsoft Power Platform pipelines in the specified Power Platform environment.';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use the exact same description as is in the docs file.

}

public async commandAction(logger: Logger, args: any): Promise<void> {

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this superfluous line break

catch (ex: any) {
this.handleRejectedODataJsonPromise(ex);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this superfluous line break

}

private async listPipelines(instanceUrl: string): Promise<any> {

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this superfluous line break


return pipelines.value;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this sup... you get the gist of it :-)

});
}

#initOptions(): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

I overlooked this the previous review, but you're actually using the older setup of options and validation. We've since moved to zod, which is a tool to help parse options and validate the schema.

Would you mind reworking this command so that it aligns with the new way of working on this count? You can find a good example in recyclebinitem-restore.ts.

}
}), new CommandError(errorMessage));
});

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this linebreak as well.. and i see another couple of line breaks that can be removed here.

@martinlingstuyl martinlingstuyl marked this pull request as draft January 14, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accept for hacktoberfest, will merge later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New command: m365 pp pipeline list
4 participants