-
Notifications
You must be signed in to change notification settings - Fork 32
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 #188 from metcalfc/pr_183
Fix up PR 183. The broken test is because the action isn't deployed yet.
- Loading branch information
Showing
8 changed files
with
87 additions
and
19 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,27 @@ | ||
name: Test branches with slash in name | ||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# To use this repository's private action, you must check out the repository | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/changelog-generator@main | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
head-ref: 'origin/test/branch' #add 'origin/` in front of your branch name | ||
base-ref: 'v1.0.0' | ||
fetch: false | ||
|
||
- name: Get the changelog | ||
run: | | ||
cat << "EOF" | ||
${{ steps.changelog.outputs.changelog }} | ||
EOF | ||
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: test | ||
name: Test the changelog action | ||
on: [push] | ||
|
||
jobs: | ||
|
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 |
---|---|---|
|
@@ -24,6 +24,14 @@ The name of the head reference. Default `${{github.sha}}`. | |
|
||
The name of the second branch. Defaults to the `tag_name` of the latest GitHub release. *This must be a GitHub release. Git tags or branches will not work.* | ||
|
||
### `reverse` | ||
|
||
Whether the order of commits should be printed in reverse. Default: 'false' | ||
|
||
### `fetch` | ||
|
||
Whether this action should pull in all other branches and tags. Default: 'true' | ||
|
||
## Outputs | ||
|
||
### `changelog` | ||
|
@@ -58,6 +66,25 @@ Or, if you have two specific references you want: | |
base-ref: 'v0.0.1' | ||
``` | ||
If you want to point to a branch containing forward slashes (https://github.com/metcalfc/changelog-generator/issues/179) do the following: | ||
```yaml | ||
|
||
# let the checkout action do the fetching | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] #TODO: bump this after release | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
head-ref: 'origin/my/branch/with/slashes' #add 'origin/` in front of your branch name | ||
base-ref: 'v1.0.0' | ||
fetch: false | ||
``` | ||
### Second block | ||
Then you can use the resulting changelog: | ||
|
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
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