File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,17 +26,18 @@ steps:
2626 - ' -c'
2727 - |
2828 set -e
29-
30- # Only run on release branches
31- if [[ "$_HEAD_BRANCH" != release-please-* ]]; then
32- echo "Not a release-please branch. Exiting."
33- exit 0
34- fi
35- echo "Release branch detected. Proceeding with Evalbench..."
29+
30+ # Fetch PR data using curl approach
31+ PR_DATA=$(curl -s -H "Authorization: token $$GITHUB_TOKEN" \
32+ "https://api.github.com/repos/$REPO_FULL_NAME/pulls/$_PR_NUMBER")
33+
34+ # Extract labels and title from PR data
35+ PR_LABELS=$(echo "$PR_DATA" | jq -r '.labels[].name' | paste -sd ',')
36+ PR_TITLE=$(echo "$PR_DATA" | jq -r '.title')
3637
3738 # Determine Release Version
38- if [[ '$_PR_LABELS ' =~ 'autorelease: triggered' ]]; then
39- if [[ '$_PR_TITLE ' =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
39+ if [[ '$PR_LABELS ' =~ 'autorelease: triggered' ]]; then
40+ if [[ '$PR_TITLE ' =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
4041 export RELEASE_VERSION="$${BASH_REMATCH[1]}"
4142 else
4243 export RELEASE_VERSION="unknown"
@@ -77,3 +78,5 @@ availableSecrets:
7778 secretManager :
7879 - versionName : projects/$PROJECT_ID/secrets/daily-ci-evals-db-password/versions/latest
7980 env : ' DB_PASSWORD'
81+ - versionName : projects/$PROJECT_ID/secrets/GITHUB_TOKEN/versions/latest
82+ env : ' GITHUB_TOKEN'
You can’t perform that action at this time.
0 commit comments