* feat: restore working base branch and uncommitted changes

* docs: uncommitted changes are stashed and restored

* docs: add major version notes

* fix: update package version

* fix: update package-lock

* feat: revise proxy implementation

* docs: add notes for the revised proxy implementation

* feat: set and remove git safe directory

* docs: add notes for the git safe directory feature

* fix: use base url for proxy check

* feat: determine the git dir with rev-parse

* build: update package lock

* fix: remove support for ghes alpha

* feat: revise handling of team reviewers

* docs: update notes

* feat: body-path

* docs: update to v5

* docs: update to v5

* build: fix package lock
This commit is contained in:
Peter Evans 2023-04-05 08:41:18 +09:00 committed by GitHub
parent 1847e5d1d6
commit 5b4a9f6a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 501 additions and 59041 deletions

View file

@ -72,14 +72,15 @@ export class GitCommandManager {
async config(
configKey: string,
configValue: string,
globalConfig?: boolean
globalConfig?: boolean,
add?: boolean
): Promise<void> {
await this.exec([
'config',
globalConfig ? '--global' : '--local',
configKey,
configValue
])
const args: string[] = ['config', globalConfig ? '--global' : '--local']
if (add) {
args.push('--add')
}
args.push(...[configKey, configValue])
await this.exec(args)
}
async configExists(
@ -145,6 +146,10 @@ export class GitCommandManager {
return output.stdout.trim().split(`${configKey} `)[1]
}
getGitDirectory(): Promise<string> {
return this.revParse('--git-dir')
}
getWorkingDirectory(): string {
return this.workingDirectory
}
@ -210,6 +215,23 @@ export class GitCommandManager {
return output.stdout.trim()
}
async stashPush(options?: string[]): Promise<boolean> {
const args = ['stash', 'push']
if (options) {
args.push(...options)
}
const output = await this.exec(args)
return output.stdout.trim() !== 'No local changes to save'
}
async stashPop(options?: string[]): Promise<void> {
const args = ['stash', 'pop']
if (options) {
args.push(...options)
}
await this.exec(args)
}
async status(options?: string[]): Promise<string> {
const args = ['status']
if (options) {