fix: drop dependency upon @actions/github to get the context.#2594
Merged
fix: drop dependency upon @actions/github to get the context.#2594
@actions/github to get the context.#2594Conversation
Pull Request Test Coverage Report for Build 21415015930Details
💛 - Coveralls |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the @actions/github dependency and replaces it with an internal implementation of the Context class. This reduces the dependency footprint by eliminating the entire @actions/github package and its transitive dependencies (including @octokit/* packages).
Changes:
- Removed
@actions/githubdependency from package.json and pnpm-lock.yaml - Created internal implementation of Context class copied from @actions/toolkit
- Added proper MIT license attribution for the copied code
- Updated all imports to use the internal implementation instead of the external package
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Removed @actions/github and all its transitive dependencies (@octokit/*, undici, etc.) |
| action-src/package.json | Removed @actions/github from devDependencies |
| action-src/src/actions/github/context.ts | New internal implementation of Context class copied from @actions/toolkit |
| action-src/src/actions/github/interfaces.ts | New internal type definitions for webhook payloads copied from @actions/toolkit |
| action-src/src/actions/github/index.ts | Export module for the internal github actions utilities |
| action-src/src/actions/github/README.md | Documentation for the internal implementation (contains minor spelling issues) |
| action-src/src/actions/github/LICENSE.md | MIT license attribution for the copied code |
| action-src/src/actions/github/context.test.ts | Test suite for the Context class implementation |
| action-src/src/main.ts | Updated import to use internal Context implementation |
| action-src/src/action.ts | Updated import to use internal Context implementation |
| action-src/src/action.test.ts | Updated import to use internal Context implementation and improved imports to use node: protocol |
| action/lib/main_root.cjs | Compiled output reflecting the changes |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jason Dent <Jason3S@users.noreply.github.com>
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.
Pull request overview
This PR removes the
@actions/githubdependency and replaces it with an internal implementation of the Context class. This reduces the dependency footprint by eliminating the entire @actions/github package and its transitive dependencies (including @octokit/* packages).Changes:
@actions/githubdependency from package.json and pnpm-lock.yaml