You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+33-2
Original file line number
Diff line number
Diff line change
@@ -70,19 +70,50 @@ Then you can use the resulting changelog:
70
70
EOF
71
71
```
72
72
73
+
### Simple output modifications
74
+
75
+
Some folks have asked if the action can support changing the output. For example:
76
+
* Reverse order
77
+
* Ignore entries that include this string.
78
+
* Etc
79
+
80
+
In order to keep this action as simple as possible we aren't planning to add more flags or options. However since the output is just text you can write a command line to do anything you want. In issue #93 we had a user that wanted to list the changelog in reverse order and drop any entries with `gh-pages`. Here is how they can do that but using Bumping as the restrict word because it shows up in this projects history:
81
+
82
+
```yaml
83
+
- name: Modify the changelog
84
+
id: modified
85
+
run: |
86
+
set -o noglob
87
+
log=$(cat << "EOF" | grep -v Bumping | tac
88
+
${{ steps.changelog.outputs.changelog }}
89
+
EOF
90
+
)
91
+
log="${log//'%'/'%25'}"
92
+
log="${log//$'\n'/'%0A'}"
93
+
log="${log//$'\r'/'%0D'}"
94
+
echo "::set-output name=modified::$log"
95
+
- name: Print the modified changelog
96
+
run: |
97
+
cat << "EOF"
98
+
${{ steps.modified.outputs.modified }}
99
+
EOF
100
+
```
101
+
102
+
You might be wondering about that set of escaping for the `log`. Thats because GitHub Actions doesn't support multiline output. Read more [here](https://github.community/t/set-output-truncates-multiline-strings/16852).
103
+
73
104
## Example use case
74
105
75
106
[Generating the release notes for a GitHub Release.](.github/workflows/release.yml)
76
107
77
108
## Open Discussions for feature requests or questions
78
109
79
-
Issues are for folks who are actively using the action and running into an "issue" (bug, missing doc, etc).
110
+
Issues are for folks who are actively using the action and running into an "issue" (bug, missing doc, etc).
80
111
81
112
Feature requests should be in the [discussion section.](https://github.com/metcalfc/changelog-generator/discussions).
82
113
Just to set expectations the bar for a new feature getting added is going to be very high. There is a
83
114
cost to adding features in the development and maintainance of the feature. So if you want to jump in and
84
115
help develop and maintain lets discuss. If you want to fire off feature ideas, go for it. Just understand its
85
-
very likely that without someone willing to take up the task, they won't get implemented.
116
+
very likely that without someone willing to take up the task, they won't get implemented.
0 commit comments