Skip to content

Commit

Permalink
fix branch name on CI (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: psomangali <priya.somangali@agoda.com>
  • Loading branch information
priyasomangali and psomangali committed Aug 23, 2023
1 parent c220e67 commit 6575a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Agoda.DevFeedback.Common/GitContextReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public static class GitContextReader
public static GitContext GetGitContext()
{
string url = RunCommand("config --get remote.origin.url");
string branch = RunCommand("rev-parse --abbrev-ref HEAD");

string branch = Environment.GetEnvironmentVariable("CI_COMMIT_REF_NAME") ?? RunCommand("rev-parse --abbrev-ref HEAD");
if (string.IsNullOrEmpty(url))
{
throw new GitContextException("Unable to get git remote url.");
Expand Down

0 comments on commit 6575a4e

Please sign in to comment.