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
feat: use dash notation for inputs (deprecates underscore notation) (actions#59)
Fixesactions#57
This PR implements the 3-step plan proposed by @gr2m in
actions#57 (comment):
> 1. Support both input types
> 2. Log a deprecation warning for the old notation
> 3. Add a test for deprecations
Although this PR supports both input formats simultaneously, I opted
_not_ to document the old format in the updated README. That’s a
decision I’m happy to revisit, if y’all would prefer to have
documentation for both the old and new formats.
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ jobs:
22
22
- uses: actions/create-github-app-token@v1
23
23
id: app-token
24
24
with:
25
-
app_id: ${{ vars.APP_ID }}
26
-
private_key: ${{ secrets.PRIVATE_KEY }}
25
+
app-id: ${{ vars.APP_ID }}
26
+
private-key: ${{ secrets.PRIVATE_KEY }}
27
27
- uses: peter-evans/create-or-update-comment@v3
28
28
with:
29
29
token: ${{ steps.app-token.outputs.token }}
@@ -44,8 +44,8 @@ jobs:
44
44
id: app-token
45
45
with:
46
46
# required
47
-
app_id: ${{ vars.APP_ID }}
48
-
private_key: ${{ secrets.PRIVATE_KEY }}
47
+
app-id: ${{ vars.APP_ID }}
48
+
private-key: ${{ secrets.PRIVATE_KEY }}
49
49
- uses: actions/checkout@v3
50
50
with:
51
51
token: ${{ steps.app-token.outputs.token }}
@@ -69,8 +69,8 @@ jobs:
69
69
- uses: actions/create-github-app-token@v1
70
70
id: app-token
71
71
with:
72
-
app_id: ${{ vars.APP_ID }}
73
-
private_key: ${{ secrets.PRIVATE_KEY }}
72
+
app-id: ${{ vars.APP_ID }}
73
+
private-key: ${{ secrets.PRIVATE_KEY }}
74
74
owner: ${{ github.repository_owner }}
75
75
- uses: peter-evans/create-or-update-comment@v3
76
76
with:
@@ -91,8 +91,8 @@ jobs:
91
91
- uses: actions/create-github-app-token@v1
92
92
id: app-token
93
93
with:
94
-
app_id: ${{ vars.APP_ID }}
95
-
private_key: ${{ secrets.PRIVATE_KEY }}
94
+
app-id: ${{ vars.APP_ID }}
95
+
private-key: ${{ secrets.PRIVATE_KEY }}
96
96
owner: ${{ github.repository_owner }}
97
97
repositories: "repo1,repo2"
98
98
- uses: peter-evans/create-or-update-comment@v3
@@ -114,8 +114,8 @@ jobs:
114
114
- uses: actions/create-github-app-token@v1
115
115
id: app-token
116
116
with:
117
-
app_id: ${{ vars.APP_ID }}
118
-
private_key: ${{ secrets.PRIVATE_KEY }}
117
+
app-id: ${{ vars.APP_ID }}
118
+
private-key: ${{ secrets.PRIVATE_KEY }}
119
119
owner: another-owner
120
120
- uses: peter-evans/create-or-update-comment@v3
121
121
with:
@@ -126,11 +126,11 @@ jobs:
126
126
127
127
## Inputs
128
128
129
-
### `app_id`
129
+
### `app-id`
130
130
131
131
**Required:** GitHub App ID.
132
132
133
-
### `private_key`
133
+
### `private-key`
134
134
135
135
**Required:** GitHub App private key.
136
136
@@ -145,7 +145,7 @@ jobs:
145
145
> [!NOTE]
146
146
> If `owner` is set and `repositories` is empty, access will be scoped to all repositories in the provided repository owner's installation. If `owner` and `repositories` are empty, access will be scoped to only the current repository.
147
147
148
-
### `skip_token_revoke`
148
+
### `skip-token-revoke`
149
149
150
150
**Optional:** If truthy, the token will not be revoked when the current job is complete.
// 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
+
thrownewError("Input required and not supplied: app-id");
// 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.
25
+
thrownewError("Input required and not supplied: private-key");
0 commit comments