Skip to content

Commit d208d8b

Browse files
dependabot[bot]Luís Tavares
andauthored
build(deps): bump @neondatabase/api-client from 1.10.3 to 1.11.2 (#19)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Luís Tavares <luis@neon.tech>
1 parent 2478f7f commit d208d8b

12 files changed

Lines changed: 389 additions & 252 deletions

File tree

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ repository with `contents: read` or `contents: write`.
105105
For a complete list of permissions, refer to the GitHub documentation on
106106
[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).
107107

108-
If your branch has more than one database or role, see the
108+
If your branch has more than one database, see the
109109
[advanced usage section](#advanced-usage) below.
110110

111111
## Advanced usage
@@ -125,7 +125,6 @@ use these default values:
125125
- `github-token` — `${{ github.token }}`, the ephemeral GitHub token used to
126126
create comments
127127
- `api_host` — `https://console.neon.tech/api/v2`
128-
- `username` — `neondb_owner`, the default role for new Neon projects
129128
- `database` — `neondb`, the default database name for new Neon projects
130129

131130
The GitHub token is required to create PR comments. The (`${{ github.token }}`)
@@ -152,7 +151,6 @@ steps:
152151
base_branch: main
153152
api_key: ${{ secrets.NEON_API_KEY }}
154153
database: mydatabase
155-
username: myrole
156154
```
157155

158156
Additionally, you can set up extra parameters to define the state of your
@@ -169,7 +167,6 @@ Supported parameters:
169167
| `api_key` | required | n/a |
170168
| `base_branch` | optional | empty, will default to the parent branch |
171169
| `api_host` | optional | `https://console.neon.tech/api/v2` |
172-
| `username` | optional | `neondb_owner` |
173170
| `database` | optional | `neondb` |
174171
| `lsn` | optional | empty, will default to the branch's head |
175172
| `timestamp` | optional | empty, will default to the branch's head |

__tests__/diff.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('diff function', () => {
1717
const projectId = 'test-project'
1818
const apiKey = 'test-api-key'
1919
const apiHost = 'https://api.neon.tech'
20-
const username = 'test-user'
2120
const database = 'test-db'
2221

2322
beforeEach(() => {
@@ -33,7 +32,6 @@ describe('diff function', () => {
3332
{ compare: { type: 'name', value: 'branch1' } },
3433
apiKey,
3534
apiHost,
36-
username,
3735
database
3836
)
3937
).rejects.toThrow(`Failed to list branches for project ${projectId}`)
@@ -51,7 +49,6 @@ describe('diff function', () => {
5149
{ compare: { type: 'name', value: 'branch1' } },
5250
apiKey,
5351
apiHost,
54-
username,
5552
database
5653
)
5754
).rejects.toThrow(`Branch branch1 not found in project ${projectId}`)
@@ -72,7 +69,6 @@ describe('diff function', () => {
7269
},
7370
apiKey,
7471
apiHost,
75-
username,
7672
database
7773
)
7874
).rejects.toThrow(`Branch branch2 not found in project ${projectId}`)
@@ -90,7 +86,6 @@ describe('diff function', () => {
9086
{ compare: { type: 'name', value: 'branch1' } },
9187
apiKey,
9288
apiHost,
93-
username,
9489
database
9590
)
9691
).rejects.toThrow(`Branch branch1 has no parent`)
@@ -113,7 +108,6 @@ describe('diff function', () => {
113108
{ compare: { type: 'name', value: 'branch1' } },
114109
apiKey,
115110
apiHost,
116-
username,
117111
database
118112
)
119113
).rejects.toThrow(`Parent branch for branch1 not found`)
@@ -139,7 +133,6 @@ describe('diff function', () => {
139133
{ compare: { type: 'name', value: 'branch1' } },
140134
apiKey,
141135
apiHost,
142-
username,
143136
database
144137
)
145138
).rejects.toThrow(
@@ -170,7 +163,6 @@ describe('diff function', () => {
170163
{ compare: { type: 'name', value: 'branch1' } },
171164
apiKey,
172165
apiHost,
173-
username,
174166
database
175167
)
176168
).rejects.toThrow(
@@ -204,7 +196,6 @@ describe('diff function', () => {
204196
{ compare: { type: 'name', value: 'branch1' } },
205197
apiKey,
206198
apiHost,
207-
username,
208199
database
209200
)
210201

@@ -265,7 +256,6 @@ describe('diff function', () => {
265256
{ compare: { type: 'name', value: 'branch1' } },
266257
apiKey,
267258
apiHost,
268-
username,
269259
database
270260
)
271261

@@ -295,7 +285,6 @@ describe('summary function', () => {
295285
} as Branch
296286

297287
const database = 'test-db'
298-
const role = 'test-role'
299288
const projectId = 'project-123'
300289

301290
beforeEach(() => {
@@ -316,7 +305,6 @@ describe('summary function', () => {
316305
compareBranch,
317306
baseBranch,
318307
database,
319-
role,
320308
projectId
321309
)
322310

@@ -333,7 +321,6 @@ describe('summary function', () => {
333321
compareBranch,
334322
baseBranch,
335323
database,
336-
role,
337324
projectId
338325
)
339326

@@ -374,7 +361,6 @@ describe('summary function', () => {
374361
unprotectedCompareBranch,
375362
unprotectedBaseBranch,
376363
database,
377-
role,
378364
projectId
379365
)
380366

__tests__/main.test.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const mockedDiffResult = {
4343
id: '2',
4444
name: 'main'
4545
} as Branch,
46-
role: 'neondb_owner',
4746
database: 'neondb'
4847
}
4948

@@ -106,36 +105,13 @@ describe('action', () => {
106105
expect(errorMock).not.toHaveBeenCalled()
107106
})
108107

109-
it('invalid username input', async () => {
110-
getInputMock.mockImplementation((name: string) => {
111-
switch (name) {
112-
case 'api_host':
113-
return 'https://console.neon.tech/api/v2'
114-
case 'username':
115-
return ''
116-
default:
117-
return name
118-
}
119-
})
120-
121-
await main.run()
122-
expect(runMock).toHaveReturned()
123-
expect(setFailedMock).toHaveBeenNthCalledWith(
124-
1,
125-
'Database username/role cannot be empty'
126-
)
127-
expect(errorMock).not.toHaveBeenCalled()
128-
})
129-
130108
it('valid inputs', async () => {
131109
getInputMock.mockImplementation((name: string) => {
132110
switch (name) {
133111
case 'api_host':
134112
return 'https://console.neon.tech/api/v2'
135113
case 'database':
136114
return 'neondb'
137-
case 'username':
138-
return 'neondb_owner'
139115
case 'timestamp':
140116
case 'lsn':
141117
return ''
@@ -175,8 +151,6 @@ describe('action', () => {
175151
return 'https://console.neon.tech/api/v2'
176152
case 'database':
177153
return 'neondb'
178-
case 'username':
179-
return 'neondb_owner'
180154
case 'timestamp':
181155
case 'lsn':
182156
return ''

action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ inputs:
2525
api_host:
2626
description: The Neon API Host
2727
default: https://console.neon.tech/api/v2
28-
username:
29-
description: The db role name
30-
default: neondb_owner
3128
database:
3229
description: The database name
3330
default: neondb

0 commit comments

Comments
 (0)