Skip to content

Commit

Permalink
Add gitea download url to yaml downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
krauselukas authored and eduardoj committed Sep 27, 2022
1 parent 7397b89 commit 67d7730
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/app/services/workflows/yaml_downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def download_url
when 'gitlab'
# This GitLab URL admits both a branch name and a commit sha.
"#{@scm_payload[:api_endpoint]}/#{@scm_payload[:path_with_namespace]}/-/raw/#{@scm_payload[:target_branch]}/.obs/workflows.yml"
when 'gitea'
"#{@scm_payload[:api_endpoint]}/#{@scm_payload[:target_repository_full_name]}/raw/branch/#{@scm_payload[:target_branch]}/.obs/workflows.yml"
end
rescue Octokit::InvalidRepository => e
raise Token::Errors::NonExistentRepository, e.message
Expand Down

0 comments on commit 67d7730

Please sign in to comment.