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

Add interactive command to create new incident. #16

Closed
calavera opened this issue Nov 23, 2016 · 3 comments
Closed

Add interactive command to create new incident. #16

calavera opened this issue Nov 23, 2016 · 3 comments

Comments

@calavera
Copy link
Contributor

- Do you want to request a feature or report a bug?

This is a new feature.

- What is the current behavior?

You need to use hugo directly to create a new incident and then modify the frontMatter.

- What is the expected behavior?

I'd like to type something like npm run new and then be prompted with a series of questions, something like this:

prompt> npm run new
output > What the cause of the incident? 
input   > Connection issues in the load balancer
output > What's the severity of the incident? (degraded-performance, minor-outage, major-outage...)
input   >  minor-outage
output > What are the affected systems? (API, CDN, Origin servers...)
input   > CDN, Origin servers
output > Edit site/content/incidents/connection-issues-in-the-load-balancer.md ? (y/n)
input   > n
prompt>

The last question is not required, but having a prompt like this would make the process slightly faster and more convenient, specially to fill severity and affected systems.

@AmGarera
Copy link

I'd like to take a shot at this in the upcoming week when my time frees up

@steveoh
Copy link
Contributor

steveoh commented Sep 6, 2017

FYI, I started this with #28

image

image

@steveoh steveoh mentioned this issue Sep 6, 2017
verythorough pushed a commit that referenced this issue Sep 12, 2017
* Add inquirer to get some prompts

* Create some questions

Refs #16

* Add tomljs to read config for choices

* Kebab-case the input file name

* Fix listing errors

* Lint all relevant js files

* Add new incident npm script

* Set as default so out of the box this just works

* refactor out args that are used everywhere

* Add inquirer validation

* Handle inquirer answers

* Create toml from answers

* Fix linting

* Treat title and file name separately

This allows for Hugo new to work and enhances the gulp task but breaks
TranslationBaseName e.g.: `post` for `post.es.md` (if `Multilingual` is
enabled.) which I’m not sure is enabled by default.

* add comment to replace

* update new issue creation

* fix spelling
@steveoh
Copy link
Contributor

steveoh commented Sep 12, 2017

this can be closed also.

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

No branches or pull requests

4 participants