Skip to content

Improve git functions#1085

Merged
int128 merged 11 commits intomainfrom
int128/Refactor-git-functions
Jan 1, 2026
Merged

Improve git functions#1085
int128 merged 11 commits intomainfrom
int128/Refactor-git-functions

Conversation

@int128
Copy link
Copy Markdown
Owner

@int128 int128 commented Dec 31, 2025

Changes

  • Pass the credentials via --config-env and environment variable.
  • Add --quiet flags.
  • Do not change the global config.

@int128 int128 changed the title Refactor git functions Improve git functions Jan 1, 2026
@int128 int128 marked this pull request as ready for review January 1, 2026 01:57
@int128 int128 requested a review from Copilot January 1, 2026 02:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the token parameter from input types
  • Changed authentication to use --config-env with environment variables instead of git config
  • Added --quiet flags 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.

Comment thread src/git.ts
@int128 int128 force-pushed the int128/Refactor-git-functions branch from b79cfe7 to 642e01f Compare January 1, 2026 03:00
@int128 int128 merged commit 1dbfe99 into main Jan 1, 2026
6 checks passed
@int128 int128 deleted the int128/Refactor-git-functions branch January 1, 2026 03:02
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.

2 participants