Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit ca8db9b

Browse files
authored
Update logic for extracting Asana task ID (#3966)
Task/Issue URL: https://app.asana.com/0/1199333091098016/1209401276129396 Tech Design URL: CC: Description: This PR fixes the Asana comment functionality of the iOS ad-hoc workflow.
1 parent 66a34e8 commit ca8db9b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/ios-adhoc.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,18 @@ jobs:
8383
path: ${{ env.dsyms_path }}
8484

8585
- name: Get Asana Task ID
86+
if: inputs.asana-task-url
8687
id: get-task-id
87-
if: github.event.inputs.asana-task-url
88+
env:
89+
ASANA_TASK_URL: ${{ inputs.asana-task-url }}
8890
run: |
89-
task_url_regex='^https://app.asana.com/[0-9]/[0-9]*/([0-9]*)/f$'
90-
if [[ "${{ github.event.inputs.asana-task-url }}" =~ ${task_url_regex} ]]; then
91-
echo "task_id=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
92-
else
93-
echo "::error::Asana Task URL has incorrect format (attempted to match ${task_url_regex})."
94-
fi
91+
task_id=$(echo "$ASANA_TASK_URL" \
92+
| sed -E 's|.*https://(.*)|\1|' \
93+
| cut -d '/' -f 4)
94+
echo "task_id=${task_id//[^0-9]/}" >> $GITHUB_OUTPUT
9595
9696
- name: Upload IPA to Asana
97-
if: github.event.inputs.asana-task-url
97+
if: inputs.asana-task-url
9898
env:
9999
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
100100
run: |

0 commit comments

Comments
 (0)