1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-11-27 22:49:17 +01:00

Pass showProgress to fetchOptions

This commit is contained in:
Shia 2023-09-05 08:46:38 +09:00 committed by Shia
parent b4ffde65f4
commit f329befabb
3 changed files with 9 additions and 5 deletions

4
dist/index.js vendored
View file

@ -1243,7 +1243,9 @@ function getSource(settings) {
} }
// Fetch // Fetch
core.startGroup('Fetching the repository'); core.startGroup('Fetching the repository');
const fetchOptions = {}; const fetchOptions = {
showProgress: settings.showProgress
};
if (settings.filter) { if (settings.filter) {
fetchOptions.filter = settings.filter; fetchOptions.filter = settings.filter;
} }

View file

@ -34,7 +34,7 @@ export interface IGitCommandManager {
filter?: string filter?: string
fetchDepth?: number fetchDepth?: number
fetchTags?: boolean fetchTags?: boolean
showProgress?: boolean showProgress: boolean
} }
): Promise<void> ): Promise<void>
getDefaultBranch(repositoryUrl: string): Promise<string> getDefaultBranch(repositoryUrl: string): Promise<string>
@ -246,7 +246,7 @@ class GitCommandManager {
filter?: string filter?: string
fetchDepth?: number fetchDepth?: number
fetchTags?: boolean fetchTags?: boolean
showProgress?: boolean showProgress: boolean
} }
): Promise<void> { ): Promise<void> {
const args = ['-c', 'protocol.version=2', 'fetch'] const args = ['-c', 'protocol.version=2', 'fetch']

View file

@ -157,8 +157,10 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
filter?: string filter?: string
fetchDepth?: number fetchDepth?: number
fetchTags?: boolean fetchTags?: boolean
showProgress?: boolean showProgress: boolean
} = {} } = {
showProgress: settings.showProgress
}
if (settings.filter) { if (settings.filter) {
fetchOptions.filter = settings.filter fetchOptions.filter = settings.filter