Skip to content

Commit

Permalink
init changelog contributor tag and PR comment (#344)
Browse files Browse the repository at this point in the history
* `init` changelog contributor tag and PR comment

* include PR perms
  • Loading branch information
jbolda authored Jul 13, 2024
1 parent 597af1c commit 1a1f4c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/init-new-features-and-permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"covector": patch:enhance
---

Enable new features in `covector init` and adjust permissions to suit. This includes tagging contributors in the changelog and writing a comment in PRs with additional context (non-forks only through `init`).
9 changes: 8 additions & 1 deletion packages/covector/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ jobs:
uses: jbolda/covector/packages/action@covector-v${version}
id: covector
with:
token: \${{ secrets.GITHUB_TOKEN }}
command: 'status'
comment: true
`;

const githubPublishWorkflow = ({
Expand All @@ -417,7 +419,12 @@ on:
- ${branchName}
permissions:
# required for npm provenance
id-token: write
# required to create the GitHub Release
contents: write
# required for creating the Version Packages Release
pull-requests: write
jobs:
version-or-publish:
Expand All @@ -436,7 +443,6 @@ jobs:
? `
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'`
: ""
}${
Expand Down Expand Up @@ -468,6 +474,7 @@ jobs:
token: \${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true
recognizeContributors: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v6
Expand Down

0 comments on commit 1a1f4c6

Please sign in to comment.