diff --git a/.github/workflows/crowdin-branch-cleanup.yml b/.github/workflows/crowdin-branch-cleanup.yml index 552e4980ff1..7515abfa034 100644 --- a/.github/workflows/crowdin-branch-cleanup.yml +++ b/.github/workflows/crowdin-branch-cleanup.yml @@ -24,10 +24,10 @@ jobs: id: get-prs run: | LABEL="ready-for-translation" - API_URL="https://api.github.com/repos/Metamask/crowdin-sandbox/pulls?head:$CURRENT_BRANCH&state=open&per_page=100" + API_URL="https://api.github.com/repos/Metamask/crowdin-sandbox/pulls?head:${{steps.extract_current_branch.outputs.branch}}&state=open&per_page=100" # Fetch the list of open pull requests with the specified label using curl - PRS="$(curl -sS --header "Authorization: Bearer $GITHUB_TOKEN" "$API_URL")" - BRANCHES=$(echo "$PRS" | jq -r '[.[] | select(.labels[].name == "'"$LABEL"'") | .head.ref] | @json') + PRS=$(curl -sS --header "Authorization: Bearer $GITHUB_TOKEN" "$API_URL") + PR=$(echo "$PRS" | jq -r '.[] | select(.labels[].name == "'"$LABEL"'") | .number | @json') echo "Found PR: $PR" echo "pr=$PR" >> "$GITHUB_OUTPUT" env: