Skip to content

Commit c304ff9

Browse files
committed
Remove deprecated private_key input
1 parent 0ae9e01 commit c304ff9

File tree

5 files changed

+3
-32
lines changed

5 files changed

+3
-32
lines changed

action.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ inputs:
1010
required: true
1111
private-key:
1212
description: "GitHub App private key"
13-
required: false # TODO: When 'private_key' is removed, make 'private-key' required
14-
private_key:
15-
description: "GitHub App private key"
16-
required: false
17-
deprecationMessage: "'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead."
13+
required: true
1814
owner:
1915
description: "The owner of the GitHub App installation (defaults to current repository owner)"
2016
required: false

main.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
1515
}
1616

1717
const appId = core.getInput("app-id");
18-
const privateKey = core.getInput("private-key") || core.getInput("private_key");
19-
if (!privateKey) {
20-
// The 'private_key' input was previously required, but it and 'private-key' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
21-
throw new Error("Input required and not supplied: private-key");
22-
}
18+
const privateKey = core.getInput("private-key")
2319
const owner = core.getInput("owner");
2420
const repositories = core.getInput("repositories")
2521
.split(/[\n,]+/)

tests/main-missing-private-key.test.js

-10
This file was deleted.

tests/snapshots/index.js.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Generated by [AVA](https://avajs.dev).
1212

1313
> stdout
1414
15-
`private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
16-
skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.`
15+
'skip_token_revoke — \'skip_token_revoke\' is deprecated and will be removed in a future version. Use \'skip-token-revoke\' instead.'
1716

1817
## main-custom-github-api-url.test.js
1918

@@ -44,16 +43,6 @@ Generated by [AVA](https://avajs.dev).
4443
4544
''
4645

47-
## main-missing-private-key.test.js
48-
49-
> stderr
50-
51-
'Input required and not supplied: private-key'
52-
53-
> stdout
54-
55-
''
56-
5746
## main-missing-repository.test.js
5847

5948
> stderr

tests/snapshots/index.js.snap

-48 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)