-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from wp-cli/85-github-tempaltes
Introduce `wp scaffold package-github` to scaffold GitHub templates
- Loading branch information
Showing
9 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
<!-- | ||
|
||
Thanks for creating a new issue! | ||
|
||
Found a bug or want to suggest an enhancement? Before completing your issue, please review our best practices: https://make.wordpress.org/cli/handbook/bug-reports/ | ||
|
||
Need help with something? GitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support | ||
|
||
You can safely delete this comment. | ||
|
||
--> |
This file contains 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,14 @@ | ||
<!-- | ||
|
||
Thanks for submitting a pull request! | ||
|
||
Here's an overview to our process: | ||
|
||
1. One of the project committers will soon provide a code review. | ||
2. You are expected to address the code review comments in a timely manner. | ||
3. Please make sure to include functional tests for your changes. | ||
4. The reviewing committer will merge your pull request as soon as it passes code review (and provided it fits within the scope of the project). | ||
|
||
You can safely delete this comment. | ||
|
||
--> |
This file contains 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 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 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,37 @@ | ||
Feature: Scaffold GitHub configuration for an existing package | ||
|
||
Scenario: Fails when invalid package directory provided | ||
Given an empty directory | ||
|
||
When I run `wp package path` | ||
Then save STDOUT as {PACKAGE_PATH} | ||
|
||
When I try `wp scaffold package-github {PACKAGE_PATH}/local/wp-cli/default-github` | ||
Then STDERR should be: | ||
""" | ||
Error: Invalid package directory. composer.json file must be present. | ||
""" | ||
|
||
Scenario: Scaffold GitHub configuration based on defaults | ||
Given an empty directory | ||
|
||
When I run `wp package path` | ||
Then save STDOUT as {PACKAGE_PATH} | ||
|
||
When I run `wp scaffold package wp-cli/default-github` | ||
Then the {PACKAGE_PATH}/local/wp-cli/default-github directory should exist | ||
|
||
When I run `wp scaffold package-github {PACKAGE_PATH}/local/wp-cli/default-github` | ||
Then STDOUT should contain: | ||
""" | ||
Success: Created package GitHub configuration. | ||
""" | ||
And the {PACKAGE_PATH}/local/wp-cli/default-github/.github directory should exist | ||
And the {PACKAGE_PATH}/local/wp-cli/default-github/.github/ISSUE_TEMPLATE file should contain: | ||
""" | ||
Thanks for creating a new issue! | ||
""" | ||
And the {PACKAGE_PATH}/local/wp-cli/default-github/.github/PULL_REQUEST_TEMPLATE file should contain: | ||
""" | ||
Thanks for submitting a pull request! | ||
""" |
This file contains 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 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 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,11 @@ | ||
<!-- | ||
Thanks for creating a new issue! | ||
Found a bug or want to suggest an enhancement? Before completing your issue, please review our best practices: https://make.wordpress.org/cli/handbook/bug-reports/ | ||
Need help with something? GitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support | ||
You can safely delete this comment. | ||
--> |
This file contains 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,14 @@ | ||
<!-- | ||
Thanks for submitting a pull request! | ||
Here's an overview to our process: | ||
1. One of the project committers will soon provide a code review. | ||
2. You are expected to address the code review comments in a timely manner. | ||
3. Please make sure to include functional tests for your changes. | ||
4. The reviewing committer will merge your pull request as soon as it passes code review (and provided it fits within the scope of the project). | ||
You can safely delete this comment. | ||
--> |