Skip to content

Comments

Use APP_PRIVATE_KEY environment variable instead of input#20

Closed
yaito3014 wants to merge 5 commits intomainfrom
claude/use-app-private-key-secret-dHS0c
Closed

Use APP_PRIVATE_KEY environment variable instead of input#20
yaito3014 wants to merge 5 commits intomainfrom
claude/use-app-private-key-secret-dHS0c

Conversation

@yaito3014
Copy link
Member

Summary

This PR updates the action to use the APP_PRIVATE_KEY environment variable instead of accepting PRIVATE_KEY as an explicit input parameter. This aligns with GitHub's standard approach for providing secrets to GitHub Apps.

Key Changes

  • Removed PRIVATE_KEY from the required inputs in action.yml
  • Updated the source code to read the private key from the APP_PRIVATE_KEY environment variable instead of INPUT_PRIVATE_KEY
  • Removed the PRIVATE_KEY input from the test workflow configuration

Implementation Details

The private key is now sourced from the APP_PRIVATE_KEY environment 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

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
@yaito3014 yaito3014 changed the base branch from use-own-secret to main February 18, 2026 09:36
- 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
@saki7
Copy link
Member

saki7 commented Feb 18, 2026

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
@yaito3014 yaito3014 closed this Feb 18, 2026
@yaito3014 yaito3014 deleted the claude/use-app-private-key-secret-dHS0c branch February 18, 2026 09:53
@yaito3014
Copy link
Member Author

無慈悲な close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants