feat: add client-id input and deprecate app-id#353
Conversation
Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
app-id input
|
@copilot Let's also add a new |
Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
Implemented in 37f42c5: added |
app-id inputclient-id input and deprecate app-id
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Override console.error to log only the error message (not the full stack trace) in main-missing-client-and-app-id.test.js. The stack trace contains environment-specific paths and ANSI codes that differ between local and CI environments, causing snapshot mismatches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the action to support GitHub App authentication via a new client-id input while keeping app-id for backwards compatibility (now deprecated), and makes the runtime + docs prefer client-id.
Changes:
- Add
client-idinput, deprecateapp-id, and update action metadata accordingly. - Update runtime input parsing to prefer
client-id, fallback toapp-id, and error when neither is set. - Update README and add/adjust tests + snapshots to cover the new input and missing-ID validation.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/main-missing-client-and-app-id.test.js | Adds coverage for the new “neither ID provided” failure path and snapshots its output. |
| tests/main-client-id.test.js | Adds a regression test ensuring a client-ID-shaped value works via client-id. |
| tests/index.js.snapshot | Updates snapshots to capture new stdout/stderr behavior and deprecated-input output. |
| tests/README.md | Updates test-writing guidance to point to the new missing-ID test as the “expected error” template. |
| main.js | Prefers client-id over app-id and adds explicit validation when neither is provided. |
| lib/main.js | Renames the first parameter to clientId and wires it into auth creation. |
| dist/main.cjs | Rebuild output reflecting the new input parsing and renamed parameter. |
| action.yml | Adds client-id, makes app-id optional, and marks app-id deprecated via deprecationMessage. |
| README.md | Updates docs and examples to recommend client-id, and documents precedence + deprecation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates the action to support GitHub App Client ID as a first-class input (client-id), while keeping app-id as a deprecated fallback for backwards compatibility.
Changes:
- Adds
client-idtoaction.yml, marksapp-idas optional + deprecated, and updates runtime input parsing to preferclient-id. - Updates docs and usage examples to recommend
client-idand describe precedence/validation behavior. - Adds regression tests for the new input and the “missing both IDs” error path, updating snapshots accordingly.
Show a summary per file
| File | Description |
|---|---|
action.yml |
Adds client-id, deprecates and un-requires app-id. |
main.js |
Prefers client-id, falls back to app-id, errors if neither provided. |
lib/main.js |
Renames the identifier parameter and wires it into createAppAuth. |
dist/main.cjs |
Bundled output reflecting the input and auth changes. |
README.md |
Updates recommended configuration and examples to use client-id. |
tests/main-client-id.test.js |
Adds coverage that client-id input flows through execution. |
tests/main-missing-client-and-app-id.test.js |
Adds coverage for the missing-ID validation/error behavior. |
tests/index.js.snapshot |
Updates snapshots for new tests and deprecation output. |
tests/README.md |
Updates guidance to point to the new “expected error” test. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/9 changed files
- Comments generated: 1
|
Is there an official documentation inside the GitHub docs that you should use the client ID now? For now I just see the example with an app id: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow |
Fixes: Warning: Input 'app-id' has been deprecated with message: Use 'client-id' instead. See actions/create-github-app-token#353
Fixes: Warning: Input 'app-id' has been deprecated with message: Use 'client-id' instead. See actions/create-github-app-token#353
Fixes: Warning: Input 'app-id' has been deprecated with message: Use 'client-id' instead. See actions/create-github-app-token#353
Fixes: Warning: Input 'app-id' has been deprecated with message: Use 'client-id' instead. See actions/create-github-app-token#353
Fixes: Warning: Input 'app-id' has been deprecated with message: Use 'client-id' instead. See actions/create-github-app-token#353
GitHub now recommends using a GitHub App's Client ID for authentication. This PR adds a first-class
client-idinput, keepsapp-idavailable for compatibility, and makes the migration path explicit in both runtime behavior and documentation.Action inputs
client-idinputrequiredfromapp-idapp-idas deprecated inaction.ymlRuntime behavior
client-idapp-idfor existing workflowsclient-idnorapp-idis providedDocs
client-idclient-idapp-idis deprecated and thatclient-idtakes precedence if both are setRegression coverage
client-idinputResulting usage
Users can migrate to the new input name directly: