mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Add missing types
This commit is contained in:
parent
7e7fa32a5f
commit
86ccd8cdef
4 changed files with 1921 additions and 1840 deletions
22
src/git.ts
22
src/git.ts
|
@ -50,7 +50,11 @@ export async function execGit(
|
|||
return result
|
||||
}
|
||||
|
||||
export async function addConfigOption(repoPath, name, value): Promise<boolean> {
|
||||
export async function addConfigOption(
|
||||
repoPath: string,
|
||||
name: string,
|
||||
value: string
|
||||
): Promise<boolean> {
|
||||
const result = await execGit(
|
||||
repoPath,
|
||||
['config', '--local', '--add', name, value],
|
||||
|
@ -60,8 +64,8 @@ export async function addConfigOption(repoPath, name, value): Promise<boolean> {
|
|||
}
|
||||
|
||||
export async function unsetConfigOption(
|
||||
repoPath,
|
||||
name,
|
||||
repoPath: string,
|
||||
name: string,
|
||||
valueRegex = '.'
|
||||
): Promise<boolean> {
|
||||
const result = await execGit(
|
||||
|
@ -73,8 +77,8 @@ export async function unsetConfigOption(
|
|||
}
|
||||
|
||||
export async function configOptionExists(
|
||||
repoPath,
|
||||
name,
|
||||
repoPath: string,
|
||||
name: string,
|
||||
valueRegex = '.'
|
||||
): Promise<boolean> {
|
||||
const result = await execGit(
|
||||
|
@ -86,8 +90,8 @@ export async function configOptionExists(
|
|||
}
|
||||
|
||||
export async function getConfigOption(
|
||||
repoPath,
|
||||
name,
|
||||
repoPath: string,
|
||||
name: string,
|
||||
valueRegex = '.'
|
||||
): Promise<ConfigOption> {
|
||||
const option = new ConfigOption()
|
||||
|
@ -102,8 +106,8 @@ export async function getConfigOption(
|
|||
}
|
||||
|
||||
export async function getAndUnsetConfigOption(
|
||||
repoPath,
|
||||
name,
|
||||
repoPath: string,
|
||||
name: string,
|
||||
valueRegex = '.'
|
||||
): Promise<ConfigOption> {
|
||||
if (await configOptionExists(repoPath, name, valueRegex)) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import * as semver from 'semver'
|
|||
* @param {string} versionSpec version of Python
|
||||
* @param {string} arch architecture (x64|x32)
|
||||
*/
|
||||
export function setupPython(versionSpec, arch): Promise<void> {
|
||||
export function setupPython(versionSpec: string, arch: string): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
const IS_WINDOWS = process.platform === 'win32'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue