mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	[CI] Search .forgejo/workflows first
(cherry picked from commit8b11cab677) (cherry picked from commitbe59270696) (cherry picked from commite068f8b191) (cherry picked from commit7855bb0c60) (cherry picked from commit45c4c8f443) (cherry picked from commit89520d67ff) (cherry picked from commit15eeb417a4) (cherry picked from commit6db53a2643) (cherry picked from commit2f689b321f)
This commit is contained in:
		
					parent
					
						
							
								5b8ae1e10b
							
						
					
				
			
			
				commit
				
					
						8966a9ae39
					
				
			
		
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -40,11 +40,14 @@ func IsWorkflow(path string) bool {
 | 
				
			||||||
		return false
 | 
							return false
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return strings.HasPrefix(path, ".gitea/workflows") || strings.HasPrefix(path, ".github/workflows")
 | 
						return strings.HasPrefix(path, ".forgejo/workflows") || strings.HasPrefix(path, ".gitea/workflows") || strings.HasPrefix(path, ".github/workflows")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func ListWorkflows(commit *git.Commit) (git.Entries, error) {
 | 
					func ListWorkflows(commit *git.Commit) (git.Entries, error) {
 | 
				
			||||||
	tree, err := commit.SubTree(".gitea/workflows")
 | 
						tree, err := commit.SubTree(".forgejo/workflows")
 | 
				
			||||||
 | 
						if _, ok := err.(git.ErrNotExist); ok {
 | 
				
			||||||
 | 
							tree, err = commit.SubTree(".gitea/workflows")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if _, ok := err.(git.ErrNotExist); ok {
 | 
						if _, ok := err.(git.ErrNotExist); ok {
 | 
				
			||||||
		tree, err = commit.SubTree(".github/workflows")
 | 
							tree, err = commit.SubTree(".github/workflows")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue