-
Notifications
You must be signed in to change notification settings - Fork 108
Adds support for use case templates #36
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
Merged
Merged
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b203255
basics
hiimbex 7206706
use egad generate to use local templates
hiimbex 3f3e026
update probot and add app.yml files
hiimbex b2dafcc
rm logs
hiimbex 88c89e9
so i guess that never worked in the first place
hiimbex e6e4d89
write tests for checks example, other testing clean up
hiimbex 71aa1de
finalize git data example and add test
hiimbex be2462f
update basic example to use nock
hiimbex 2294483
rm comment
hiimbex 4dec585
make ts use case actually work for basic example and add real tests
hiimbex f7c8dac
update readme
hiimbex 1890ae5
fix permissions and rm ds store
hiimbex 64623a5
add deployments example
hiimbex 095e985
Merge pull request #38 from probot/deployments
hiimbex 37721b2
update readme to include deployments
hiimbex 9f89065
Start working on tests
bkeepers eead088
get test script working??
hiimbex b8b691c
triggering travis now that i actually enabled it for this repo 🤦🏽♀️
hiimbex 01ebb21
make the script loop?
hiimbex 1940854
Merge branch 'templatess' of github.com:probot/create-probot-app into…
hiimbex 0e3f487
actually make it loop ;)
hiimbex 0fb12c2
bash??
hiimbex 073959d
fail the script if npm test fails
hiimbex 1dc9f38
maybe fix typescript?
hiimbex c0af672
Update test
hiimbex 09de52a
ok typescript 🙇🏻♂️
hiimbex e00e5be
this is definitely how this works
hiimbex 13c478c
Update templates/basic-ts/test/index.test.ts
TimonVS 52af17f
Update templates/basic-ts/test/index.test.ts
TimonVS 7d52389
Update README.md
TimonVS 85e601b
Update templates/basic-js/test/index.test.js
TimonVS 9d129fd
Update templates/basic-js/test/index.test.js
TimonVS 5a357b3
Update templates/checks-js/test/index.test.js
TimonVS 3c710d4
Update templates/basic-ts/test/index.test.ts
TimonVS e70205c
Update templates/basic-js/test/index.test.js
TimonVS 0560f15
Update templates/deploy-js/test/index.test.js
TimonVS 65c4600
Switch to using list in inquirer
bkeepers 156147e
Run tests in tmp dir
bkeepers 9be3612
sanity checking the tests
hiimbex 135a504
ok, I guess that was unnecessary :) tests work!
hiimbex 946a7db
rm readme ramblings
hiimbex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| node_modules | ||
| package-lock.json | ||
| tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| sudo: false | ||
| language: node_js | ||
| node_js: | ||
| - "8" | ||
| - "10" | ||
|
|
||
| notifications: | ||
| disabled: true | ||
|
|
||
| script: script/test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,46 @@ | ||
| # Create Probot App | ||
|
|
||
| This project will generate a new [Probot](https://github.com/probot/probot) app | ||
| with everything you need to get started and run your app in production. | ||
| This project will generate a new [Probot](https://github.com/probot/probot) app | ||
| with everything you need to get started building. 👷🏽 | ||
|
|
||
| > use the --typescript flag to generate a new TypeScript project | ||
| In particular, this command line interface allows you to select from our pre-defined blue prints to choose a basic working example to start from. | ||
|
|
||
| If you're using npm < 6: | ||
| ## Getting started with Blue Prints 🛠 | ||
|
|
||
| ```sh | ||
| npx create-probot-app [--typescript] my-first-app | ||
| npx create-probot-app my-first-app -t basic-js | ||
| ``` | ||
|
|
||
| If you're using npm > 6: | ||
| This template is a JavaScript app that will post a comment every time an issue is opened. | ||
|
|
||
| ```sh | ||
| npm init probot-app [--typescript] my-first-app | ||
| npx create-probot-app my-first-app -t basic-ts | ||
| ``` | ||
|
|
||
| If you're using Yarn: | ||
| This template is a TypeScript app that will post a comment every time an issue is opened. | ||
|
|
||
| ```sh | ||
| yarn create probot-app [--typescript] my-first-app | ||
| npx create-probot-app my-first-app -t checks-js | ||
| ``` | ||
|
|
||
| See the [Probot docs](https://probot.github.io/docs/development/) to get started. | ||
| This template is a JavaScript app that will create a new [check](https://developer.github.com/v3/checks/) every time a push happens. | ||
|
|
||
| ```sh | ||
| npx create-probot-app my-first-app -t git-data-js | ||
| ``` | ||
|
|
||
| This template is a JavaScript app that will create a new [pull request](https://developer.github.com/v3/pulls/#create-a-pull-request) using the [Git Data API](https://developer.github.com/v3/git/) every time someone installs your app. | ||
|
|
||
| ```sh | ||
| npx create-probot-app my-first-app -t deploy-js | ||
| ``` | ||
|
|
||
| This template is a JavaScript app that will create a new [deployment](https://developer.github.com/v3/repos/deployments/) every time someone opens or pushes to a pull request. | ||
|
|
||
| If you're using Yarn: | ||
|
|
||
| ```sh | ||
| yarn create probot-app my-first-app | ||
| ``` | ||
|
|
||
| See the [Probot docs](https://probot.github.io/docs/development/#running-the-app-locally) to get started running your app locally. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Ensure we're always running from the project root | ||
| cd "$(dirname "$0")/.." | ||
|
|
||
| PROJECT_DIR=$(pwd) | ||
| TEMP_DIR="$PROJECT_DIR"/tmp | ||
| mkdir -p $TEMP_DIR | ||
|
|
||
| for i in $PROJECT_DIR/templates/* | ||
| do | ||
| template=$(basename $i) | ||
| echo $template | ||
| cd $TEMP_DIR | ||
| rm -rf $template | ||
|
|
||
| $PROJECT_DIR/bin/create-probot-app.js \ | ||
| --appName "travis-template-test" \ | ||
| --desc "A Probot App for building on Travis" \ | ||
| --author "Pro Bawt" \ | ||
| --email "[email protected]" \ | ||
| --homepage "https://probot.github.io" \ | ||
| --user "probot" \ | ||
| --template $template \ | ||
| --repo "probot/create-probot-app-$template" \ | ||
| $template | ||
|
|
||
| cd $template | ||
| npm test | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # The ID of your GitHub App | ||
| APP_ID= | ||
| WEBHOOK_SECRET=development | ||
|
|
||
| # Use `trace` to get verbose logging or `info` to show less | ||
| LOG_LEVEL=debug | ||
|
|
||
| # Go to https://smee.io/new set this to the URL that you are redirected to. | ||
| WEBHOOK_PROXY_URL= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| node_modules | ||
| npm-debug.log | ||
| *.pem | ||
| .env | ||
| package-lock.json | ||
| coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Contributor Covenant Code of Conduct | ||
|
|
||
| ## Our Pledge | ||
|
|
||
| In the interest of fostering an open and welcoming environment, we as | ||
| contributors and maintainers pledge to making participation in our project and | ||
| our community a harassment-free experience for everyone, regardless of age, body | ||
| size, disability, ethnicity, gender identity and expression, level of experience, | ||
| education, socio-economic status, nationality, personal appearance, race, | ||
| religion, or sexual identity and orientation. | ||
|
|
||
| ## Our Standards | ||
|
|
||
| Examples of behavior that contributes to creating a positive environment | ||
| include: | ||
|
|
||
| * Using welcoming and inclusive language | ||
| * Being respectful of differing viewpoints and experiences | ||
| * Gracefully accepting constructive criticism | ||
| * Focusing on what is best for the community | ||
| * Showing empathy towards other community members | ||
|
|
||
| Examples of unacceptable behavior by participants include: | ||
|
|
||
| * The use of sexualized language or imagery and unwelcome sexual attention or | ||
| advances | ||
| * Trolling, insulting/derogatory comments, and personal or political attacks | ||
| * Public or private harassment | ||
| * Publishing others' private information, such as a physical or electronic | ||
| address, without explicit permission | ||
| * Other conduct which could reasonably be considered inappropriate in a | ||
| professional setting | ||
|
|
||
| ## Our Responsibilities | ||
|
|
||
| Project maintainers are responsible for clarifying the standards of acceptable | ||
| behavior and are expected to take appropriate and fair corrective action in | ||
| response to any instances of unacceptable behavior. | ||
|
|
||
| Project maintainers have the right and responsibility to remove, edit, or | ||
| reject comments, commits, code, wiki edits, issues, and other contributions | ||
| that are not aligned to this Code of Conduct, or to ban temporarily or | ||
| permanently any contributor for other behaviors that they deem inappropriate, | ||
| threatening, offensive, or harmful. | ||
|
|
||
| ## Scope | ||
|
|
||
| This Code of Conduct applies both within project spaces and in public spaces | ||
| when an individual is representing the project or its community. Examples of | ||
| representing a project or community include using an official project e-mail | ||
| address, posting via an official social media account, or acting as an appointed | ||
| representative at an online or offline event. Representation of a project may be | ||
| further defined and clarified by project maintainers. | ||
|
|
||
| ## Enforcement | ||
|
|
||
| Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
| reported by contacting the project team at {{{ email }}}. All | ||
| complaints will be reviewed and investigated and will result in a response that | ||
| is deemed necessary and appropriate to the circumstances. The project team is | ||
| obligated to maintain confidentiality with regard to the reporter of an incident. | ||
| Further details of specific enforcement policies may be posted separately. | ||
|
|
||
| Project maintainers who do not follow or enforce the Code of Conduct in good | ||
| faith may face temporary or permanent repercussions as determined by other | ||
| members of the project's leadership. | ||
|
|
||
| ## Attribution | ||
|
|
||
| This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
| available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
|
||
| [homepage]: https://www.contributor-covenant.org | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| ## Contributing | ||
|
|
||
| [fork]: /fork | ||
| [pr]: /compare | ||
| [style]: https://standardjs.com/ | ||
| [code-of-conduct]: CODE_OF_CONDUCT.md | ||
|
|
||
| Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. | ||
|
|
||
| Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. | ||
|
|
||
| ## Issues and PRs | ||
|
|
||
| If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them. | ||
|
|
||
| We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR. | ||
|
|
||
| ## Submitting a pull request | ||
|
|
||
| 1. [Fork][fork] and clone the repository. | ||
| 1. Configure and install the dependencies: `npm install`. | ||
| 1. Make sure the tests pass on your machine: `npm test`, note: these tests also apply the linter, so there's no need to lint separately. | ||
| 1. Create a new branch: `git checkout -b my-branch-name`. | ||
| 1. Make your change, add tests, and make sure the tests still pass. | ||
| 1. Push to your fork and [submit a pull request][pr]. | ||
| 1. Pat your self on the back and wait for your pull request to be reviewed and merged. | ||
|
|
||
| Here are a few things you can do that will increase the likelihood of your pull request being accepted: | ||
|
|
||
| - Follow the [style guide][style] which is using standard. Any linting errors should be shown when running `npm test`. | ||
| - Write and update tests. | ||
| - Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. | ||
| - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). | ||
|
|
||
| Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you. | ||
|
|
||
| ## Resources | ||
|
|
||
| - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) | ||
| - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) | ||
| - [GitHub Help](https://help.github.com) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ISC License | ||
|
|
||
| Copyright (c) {{{ year }}}, {{{ author }}} | ||
|
|
||
| Permission to use, copy, modify, and/or distribute this software for any | ||
| purpose with or without fee is hereby granted, provided that the above | ||
| copyright notice and this permission notice appear in all copies. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # {{ name }} | ||
|
|
||
| > A GitHub App built with [Probot](https://github.com/probot/probot) that {{ description }} | ||
|
|
||
| ## Setup | ||
|
|
||
| ```sh | ||
| # Install dependencies | ||
| npm install | ||
|
|
||
| # Run the bot | ||
| npm start | ||
| ``` | ||
|
|
||
| ## Contributing | ||
|
|
||
| If you have suggestions for how {{ name }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions. | ||
|
|
||
| For more, check out the [Contributing Guide](CONTRIBUTING.md). | ||
|
|
||
| ## License | ||
|
|
||
| [ISC](LICENSE) © {{{ year }}} {{{ author }}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like these examples all make the README harder to grok. I would stick with just the single command, and let the prompts explain the blueprints.