Skip to content

Commit

Permalink
Merge pull request #66 from ekline-io/dj/EK-666-Daily-Job-Review
Browse files Browse the repository at this point in the history
feat: Compute Quality Scores on Non-PR runs
  • Loading branch information
deepakjoshi-ekline authored Dec 27, 2024
2 parents 423ee88 + d85d1e2 commit c766d75
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ else
exit 1
fi

if [ -z "$pull_request_id" ]; then
if [ "$ci_platform" = "github" ]; then
resolved_branch="$(echo "$GITHUB_REF" | sed 's|refs/heads/||')"
base_branch="$resolved_branch"
head_branch="$resolved_branch"
elif [ "$ci_platform" = "gitlab" ]; then
resolved_branch="$CI_COMMIT_BRANCH"
base_branch="$resolved_branch"
head_branch="$resolved_branch"
elif [ "$ci_platform" = "bitbucket" ]; then
resolved_branch="$BITBUCKET_BRANCH"
base_branch="$resolved_branch"
head_branch="$resolved_branch"
fi
fi

if [ -n "${input_workspace}" ] ; then
cd "${input_workspace}/${INPUT_WORKDIR}" || { echo "Failed to get ${input_workspace}/${INPUT_WORKDIR}"; exit 1; }
git config --global --add safe.directory "${input_workspace}" || exit 1
Expand Down

0 comments on commit c766d75

Please sign in to comment.