Skip to content

Commit a6f7ced

Browse files
authored
docs: update permissions (#10)
1 parent b436b87 commit a6f7ced

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ This action performs a database schema diff on specified Neon branches for each
1515
pull request and writes a comment to the pull request highlighting the schema
1616
differences.
1717

18-
It supports workflows where schema changes are made on a development branch, and
19-
pull requests are created for review before merging the changes back into the
20-
main branch. By including schema changes as a comment in the pull request,
21-
reviewers can easily assess the differences directly within the pull request.
18+
It supports workflows where schema changes are made on a branch. When you create
19+
or update a pull request containing schema changes, the action automatically
20+
generates a comment within the pull request. By including the schema diff as
21+
part of the comment, reviewers can easily assess the changes directly within the
22+
pull request.
2223

2324
You can take a look at the [example PR comment](docs/pr_comment.md) to see what
2425
the output looks like.
@@ -56,7 +57,9 @@ are two ways you can perform this setup:
5657
Setup the action:
5758

5859
```yml
59-
permissions: write-all
60+
permissions:
61+
pull-requests: write
62+
contents: read
6063
steps:
6164
- uses: neondatabase/schema-diff-action@v1
6265
with:
@@ -87,7 +90,7 @@ jobs:
8790
your_job:
8891
permisions:
8992
pull-request: write
90-
contents: write
93+
contents: read
9194
...other permissions needed for the rest of the job
9295
steps:
9396
- uses: neondatabase/schema-diff-action@v1
@@ -97,7 +100,7 @@ jobs:
97100
When setting permissions, make sure to account for all actions your workflow
98101
performs to avoid missing any required permissions. For example, if your
99102
repository is private, you must also grant read or write access to the
100-
repository with `contents: write`.
103+
repository with `contents: read` or `contents: write`.
101104

102105
For a complete list of permissions, refer to the GitHub documentation on
103106
[Defining access for the GITHUB_TOKEN permissions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token#defining-access-for-the-github_token-permissions).

0 commit comments

Comments
 (0)