Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Commit 52b9593

Browse files
Anshul Guleriaanshulguleria
authored andcommitted
[BUG] Fixs changelog for pull_request close event
When pull request was getting merged we were getting error in changelog generation workflow as permissions error. Updated the push command to use secrets.GITHUB_TOKEN to push. It also has other benefits of not triggering the actions again. Read more at: https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#using-the-github_token-in-a-workflow Bumped package.json version to `1.0.5` [TESTING] Tested with my forked repo closes: #11
1 parent 930bf68 commit 52b9593

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/changelog.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
- name: Generate changelog
2121
uses: charmixer/auto-changelog-action@v1
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
2224

2325
- name: Commit files
2426
env:
@@ -33,9 +35,8 @@ jobs:
3335
- name: Push changes
3436
# This will be true if we are able to commit changes
3537
if: env.push == 1
36-
#env:
37-
# Do we need this again or it picks from top
38-
#CI_USER: "CHANGELOG Bot"
39-
#CI_EMAIL: "noreply@github.com"
38+
env:
39+
CI_USER: "CHANGELOG Bot"
40+
CI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4041
run: |
41-
git push origin HEAD:master
42+
git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:master

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-commit-template",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Set commit template for git packages",
55
"bin": {
66
"git-commit-template": "./bin/git-commit-template.js"

0 commit comments

Comments
 (0)