Use APP_PRIVATE_KEY environment variable instead of input#20
Closed
Use APP_PRIVATE_KEY environment variable instead of input#20
Conversation
Read the private key directly from the APP_PRIVATE_KEY environment variable instead of requiring users to pass it as an action input. This simplifies usage by letting the secret be set at the env level. https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw
The repository secret is already configured, so there's no need to explicitly pass it in the workflow step. https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw
- Normalize all identifiers to snake_case - Hoist warning/error regexes outside the loop - Extract duplicated warning/error detection into find_first_issue() - Replace custom groupBy with Object.groupBy (Node 20+) - Fix GraphQL injection: use parameterized variables instead of string interpolation for node_id - Change body ??= to plain assignment (was always null) - Inline compareDate into .toSorted() call https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw
Repository secrets must be explicitly mapped to environment variables in the workflow file — actions cannot access them directly. https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw
Member
|
ClaudeくんTypeScript書けて偉い偉いだね(AIを愛でる人) |
Extract shared logic (log parsing, table generation, comment posting)
into src/core.ts. Add src/server.ts that listens for workflow_run.completed
webhooks so users just install the GitHub App — no secrets or workflow
config needed. The action entry point (src/index.ts) still works too.
Users configure per-repo via .github/cpp-warning-notifier.json:
{ "job_regex": "...", "step_regex": "...",
"row_headers": [...], "column_header": "..." }
Server env vars: APP_ID, APP_PRIVATE_KEY, WEBHOOK_SECRET, PORT.
https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw
Member
Author
|
無慈悲な close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the action to use the
APP_PRIVATE_KEYenvironment variable instead of acceptingPRIVATE_KEYas an explicit input parameter. This aligns with GitHub's standard approach for providing secrets to GitHub Apps.Key Changes
PRIVATE_KEYfrom the required inputs inaction.ymlAPP_PRIVATE_KEYenvironment variable instead ofINPUT_PRIVATE_KEYPRIVATE_KEYinput from the test workflow configurationImplementation Details
The private key is now sourced from the
APP_PRIVATE_KEYenvironment variable, which is the standard way GitHub Actions provides secrets to GitHub App authentication. This simplifies the action's input interface and follows GitHub's conventions for app-based authentication.https://claude.ai/code/session_01YAyMBbJQrErshibAQhtxQw