mirror of
				https://code.forgejo.org/actions/checkout.git
				synced 2025-11-03 22:29:11 +00:00 
			
		
		
		
	Merge f787e7d544 into ff7abcd0c3
				
					
				
			This commit is contained in:
		
						commit
						aabe1cf80c
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
import * as core from '@actions/core'
 | 
			
		||||
import * as github from '@actions/github'
 | 
			
		||||
import * as fsHelper from './fs-helper'
 | 
			
		||||
import * as gitAuthHelper from './git-auth-helper'
 | 
			
		||||
import * as gitCommandManager from './git-command-manager'
 | 
			
		||||
| 
						 | 
				
			
			@ -274,6 +275,14 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
 | 
			
		|||
      settings.commit,
 | 
			
		||||
      settings.githubServerUrl
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    // Set default author
 | 
			
		||||
    if (!await git.configExists('user.name', true)) {
 | 
			
		||||
      await git.config('user.name', github.context.workflow, true)
 | 
			
		||||
    }
 | 
			
		||||
    if (!await git.configExists('user.email', true)) {
 | 
			
		||||
      await git.config('user.email', 'github-actions@github.com', true)
 | 
			
		||||
    }
 | 
			
		||||
  } finally {
 | 
			
		||||
    // Remove auth
 | 
			
		||||
    if (authHelper) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue