Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the git functions by switching from global git config to environment variables and command-line options for authentication and author configuration. The key goals are to avoid modifying global git configuration and to pass credentials more securely via --config-env and environment variables.
- Removed the
configureAuthor()function and thetokenparameter from input types - Changed authentication to use
--config-envwith environment variables instead of git config - Added
--quietflags to git operations and set author/committer information via environment variables - Updated the
commit()function to accept separate message and additional messages parameters
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/git.ts | Refactored authentication to use --config-env and environment variables, removed configureAuthor(), added --quiet flags, and set author/committer via env vars for all commit operations |
| src/main.ts | Removed token input parameter retrieval since it's now accessed directly in git.ts |
| src/run.ts | Removed token from Inputs type and removed the configureAuthor() call |
| src/pull_request_event.ts | Removed token from Inputs type and updated git function calls to match new signatures |
| src/other_event.ts | Updated git function calls to match new signatures (commit and push) |
| tests/pull_request_event.test.ts | Updated test expectations to match new git function signatures |
| tests/other_event.test.ts | Updated test expectations to match new git function signatures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b79cfe7 to
642e01f
Compare
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.
Changes
--config-envand environment variable.--quietflags.