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
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,11 @@ This action performs a database schema diff on specified Neon branches for each
15
15
pull request and writes a comment to the pull request highlighting the schema
16
16
differences.
17
17
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.
22
23
23
24
You can take a look at the [example PR comment](docs/pr_comment.md) to see what
24
25
the output looks like.
@@ -56,7 +57,9 @@ are two ways you can perform this setup:
56
57
Setup the action:
57
58
58
59
```yml
59
-
permissions: write-all
60
+
permissions:
61
+
pull-requests: write
62
+
contents: read
60
63
steps:
61
64
- uses: neondatabase/schema-diff-action@v1
62
65
with:
@@ -87,7 +90,7 @@ jobs:
87
90
your_job:
88
91
permisions:
89
92
pull-request: write
90
-
contents: write
93
+
contents: read
91
94
...other permissions needed for the rest of the job
92
95
steps:
93
96
- uses: neondatabase/schema-diff-action@v1
@@ -97,7 +100,7 @@ jobs:
97
100
When setting permissions, make sure to account for all actions your workflow
98
101
performs to avoid missing any required permissions. For example, if your
99
102
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`.
101
104
102
105
For a complete list of permissions, refer to the GitHub documentation on
103
106
[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