Skip to content

Commit

Permalink
handle dev and main branch in get_target_branch.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonEhrig committed Sep 3, 2024
1 parent bbd699b commit 585f27a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .ci/integTestGen/src/get_target_branch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ function get_target_branch()::AbstractString
error("Environment variable CI_COMMIT_REF_NAME is not set.")
end

if ENV["CI_COMMIT_REF_NAME"] == "main"
# run on main branch
return "main"
end

splited_commit_ref_name = split(ENV["CI_COMMIT_REF_NAME"], "/")

if (!startswith(splited_commit_ref_name[1], "pr-"))
error("CI_COMMIT_REF_NAME does not start with pr-")
# fallback for unknown branches and dev branch
return "dev"
end

# parse to Int only to check if it is a number
Expand Down

0 comments on commit 585f27a

Please sign in to comment.