Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/get_target_branch/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ runs:
id: extract
shell: bash
run: |
branch=$(echo "${{ inputs.text }}" | grep -ioP '\[(?:java|dotnet|python|ruby|php|golang|cpp|agent|nodejs)@[^]]+(?=\])' | tr -d '[:space:]' || true)
branch=$(echo "${INPUTS_TEXT}" | grep -ioP '\[(?:java|dotnet|python|ruby|php|golang|cpp|agent|nodejs)@[^]]+(?=\])' | tr -d '[:space:]' || true)

echo "target-branch=${branch#*@}" >> $GITHUB_OUTPUT

# the preferred approach to handling untrusted input is to set the value of the expression to an intermediate environment variable
env:
INPUTS_TEXT: ${{ inputs.text }}