fix: read GITHUB_EVENT_PATH using @actions/github#15
Merged
Conversation
GITHUB_EVENT_PATH with @actions/githubGITHUB_EVENT_PATH using @actions/github
488f3b9 to
819acf9
Compare
4ba017e to
e652438
Compare
Review Summary by QodoUse @actions/github for event data and rename color inputs
WalkthroughsDescription• Read GitHub event data using @actions/github instead of environment variables • Rename optionalFollowUpLabelColor to optionalFollowUpColor for consistency • Add backward compatibility for deprecated optionalFollowUpLabelColor input • Improve event type validation and error handling in main workflow • Fix handleClosedIssue to use sender ID comparison instead of login • Restore environment variable mapping from action inputs in workflow Diagramflowchart LR
A["GitHub Event"] -->|"@actions/github"| B["Event Context"]
B --> C["Event Name & Type"]
C --> D["Event Handlers"]
D --> E["Improved Validation"]
F["Config Inputs"] -->|"Renamed"| G["optionalFollowUpColor"]
G --> H["Backward Compatible"]
File Changes1. src/main.ts
|
Code Review by Qodo
1.
|
This reverts commit 9d9fc26.
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.
PR Type
Bug fix, Enhancement
Description
Read GitHub event data using @actions/github instead of environment variables
Rename
optionalFollowUpLabelColortooptionalFollowUpColorfor consistencyImprove event type detection with explicit action validation
Add environment variable mapping for action inputs in workflow
Refactor
handleClosedIssueto use sender ID comparisonDiagram Walkthrough
File Walkthrough
main.ts
Use @actions/github for event contextsrc/main.ts
process.env['GITHUB_EVENT_NAME']andprocess.env['GITHUB_EVENT_ACTION']withgithub.context.eventNameandgithub.context.payload.actionissue_commentandissueseventsconfig.ts
Standardize optional follow-up color namingsrc/config.ts
optionalFollowUpLabelColorproperty tooptionalFollowUpColorbackward compatibility
no-response.ts
Update color reference and improve issue closure validationsrc/no-response.ts
optionalFollowUpLabelColortooptionalFollowUpColorhandleClosedIssueto validate event name and use sender IDcomparison instead of login comparison
action.yml
Add new input and maintain backward compatibilityaction.yml
optionalFollowUpColorinput with default valueoptionalFollowUpLabelColorinput as compatibility-onlystep
README.md
Update documentation for renamed inputREADME.md
optionalFollowUpColorinstead ofoptionalFollowUpLabelColor