Skip to content

Commit 0ae9e01

Browse files
committed
Remove deprecated app_id input
1 parent 21cfef2 commit 0ae9e01

File tree

5 files changed

+3
-31
lines changed

5 files changed

+3
-31
lines changed

action.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ branding:
77
inputs:
88
app-id:
99
description: "GitHub App ID"
10-
required: false # TODO: When 'app_id' is removed, make 'app-id' required
11-
app_id:
12-
description: "GitHub App ID"
13-
required: false
14-
deprecationMessage: "'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead."
10+
required: true
1511
private-key:
1612
description: "GitHub App private key"
1713
required: false # TODO: When 'private_key' is removed, make 'private-key' required

main.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
1414
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
1515
}
1616

17-
const appId = core.getInput("app-id") || core.getInput("app_id");
18-
if (!appId) {
19-
// The 'app_id' input was previously required, but it and 'app-id' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
20-
throw new Error("Input required and not supplied: app-id");
21-
}
17+
const appId = core.getInput("app-id");
2218
const privateKey = core.getInput("private-key") || core.getInput("private_key");
2319
if (!privateKey) {
2420
// 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.

tests/main-missing-app-id.test.js

-9
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-
`app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊
16-
private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
15+
`private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
1716
skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.`
1817

1918
## main-custom-github-api-url.test.js
@@ -35,16 +34,6 @@ Generated by [AVA](https://avajs.dev).
3534
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
3635
::save-state name=expiresAt::2016-07-11T22:14:10Z`
3736

38-
## main-missing-app-id.test.js
39-
40-
> stderr
41-
42-
'Input required and not supplied: app-id'
43-
44-
> stdout
45-
46-
''
47-
4837
## main-missing-owner.test.js
4938

5039
> stderr

tests/snapshots/index.js.snap

-40 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)