Skip to content

Commit

Permalink
fix: post release permissions error (#1750)
Browse files Browse the repository at this point in the history
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #1682
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->
This PR applies the change suggested by @apexskier here to attempt to
fix post-release permissions:


apexskier/github-release-commenter#545 (comment)
  • Loading branch information
johnnyreilly authored Dec 7, 2024
1 parent e6e1575 commit 85c53e7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ on:
release:
types:
- published

permissions:
issues: write
pull-requests: write
4 changes: 4 additions & 0 deletions src/next/blocks/blockReleaseIt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const blockReleaseIt = base.createBlock({
types: ["published"],
},
},
permissions: {
issues: "write",
"pull-requests": "write",
},
steps: [
{ uses: "actions/checkout@v4", with: { "fetch-depth": 0 } },
{
Expand Down
4 changes: 4 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ describe("createWorkflows", () => {
release:
types:
- published
permissions:
issues: write
pull-requests: write
",
"pr-review-requested.yml": "jobs:
pr_review_requested:
Expand Down
4 changes: 4 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export function createWorkflows(options: Options) {
types: ["published"],
},
},
permissions: {
issues: "write",
"pull-requests": "write",
},
steps: [
{ uses: "actions/checkout@v4", with: { "fetch-depth": 0 } },
{
Expand Down

0 comments on commit 85c53e7

Please sign in to comment.