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

Support parameter prompting from command listeners #661

Merged
merged 1 commit into from Jan 23, 2019

Conversation

Projects
None yet
3 participants
@cdupuis
Copy link
Contributor

commented Jan 23, 2019

This enables to prompt for additional parameters during the execution of command listener functions.

See the following example:

    sdm.addCommand({
        name: "Hello",
        intent: "hello",
        parameters: { firstName: { type: "string", required: true } },
        listener: async ci => {
            const params = await ci.promptFor<{ lastName: string }>({ lastName: { required: true, type: "string" } });
            await ci.addressChannels(`${ci.parameters.firstName} ${params.lastName}`);
        },
    });

@atomist-bot atomist-bot merged commit 251c3df into master Jan 23, 2019

2 checks passed

license/cla Contributor License Agreement is signed.
Details
sdm/atomist/atomist-sdm Atomist Software Delivery Machine goals: all succeeded
Details
@atomist-bot

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2019

Pull request auto merged by Atomist.

  • 1 approved review by @johnsonr
  • 2 successful checks

[atomist:generated] [auto-merge:on-approve]

@atomist-bot atomist-bot deleted the dyn-parameter branch Jan 23, 2019

atomist-bot added a commit that referenced this pull request Jan 23, 2019

Changelog: #661 to added
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.