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

Commit

Permalink
Migrate asana-get-automation-subtask-id from GHA action to fastlane (#…
Browse files Browse the repository at this point in the history
…3175)

Task/Issue URL: https://app.asana.com/0/0/1208137627434493/f

Description:
This change removes asana-get-automation-subtask-id action, replacing it with a fastlane action from the automation plugin.
  • Loading branch information
ayoy authored Sep 2, 2024
1 parent a0bad24 commit 6197607
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 59 deletions.
18 changes: 9 additions & 9 deletions .github/actions/asana-create-action-item/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ runs:
using: "composite"
steps:
- id: get-automation-subtask
uses: ./.github/actions/asana-get-release-automation-subtask-id
with:
access-token: ${{ inputs.access-token }}
task-url: ${{ inputs.release-task-url }}
shell: bash
env:
ASANA_ACCESS_TOKEN: ${{ inputs.access-token }}
run: bundle exec fastlane run asana_get_release_automation_subtask_id task_url:"${{ inputs.release-task-url }}"

- id: get-asana-user-id
if: github.event_name != 'schedule'
Expand All @@ -53,7 +53,7 @@ runs:
- id: set-assignee-id
shell: bash
env:
USER_ID: ${{ steps.get-asana-user-id.outputs.user-id || steps.get-automation-subtask.outputs.assignee-id }}
USER_ID: ${{ steps.get-asana-user-id.outputs.user-id || steps.get-automation-subtask.outputs.asana_assignee_id }}
run: |
echo "assignee-id=${USER_ID}" >> $GITHUB_OUTPUT
Expand All @@ -62,7 +62,7 @@ runs:
shell: bash
env:
ASSIGNEE_ID: ${{ steps.set-assignee-id.outputs.assignee-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
TEMPLATE_PATH: ${{ github.action_path }}/templates/${{ inputs.template-name }}.yml
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
Expand All @@ -80,7 +80,7 @@ runs:
shell: bash
env:
ASSIGNEE_ID: ${{ steps.set-assignee-id.outputs.assignee-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
NOTES: ${{ inputs.notes }}
TASK_NAME: ${{ inputs.task-name }}
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand All @@ -93,7 +93,7 @@ runs:
shell: bash
env:
ASSIGNEE_ID: ${{ steps.set-assignee-id.outputs.assignee-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
HTML_NOTES: ${{ inputs.html-notes }}
TASK_NAME: ${{ inputs.task-name }}
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand All @@ -106,7 +106,7 @@ runs:
env:
ASANA_ACCESS_TOKEN: ${{ inputs.access-token }}
ASSIGNEE_ID: ${{ steps.set-assignee-id.outputs.assignee-id }}
TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
TASK_ID: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
PAYLOAD_BASE64: ${{ steps.process-template-payload.outputs.payload-base64 || steps.process-notes-payload.outputs.payload-base64 || steps.process-html-notes-payload.outputs.payload-base64 }}
run: |
# Create a subtask and retrieve its ID from the response (.data.gid) to return as an output
Expand Down
39 changes: 0 additions & 39 deletions .github/actions/asana-get-release-automation-subtask-id/action.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/actions/asana-log-message/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ runs:
using: "composite"
steps:
- id: get-automation-subtask
uses: ./.github/actions/asana-get-release-automation-subtask-id
with:
access-token: ${{ inputs.access-token }}
task-url: ${{ inputs.task-url }}
shell: bash
env:
ASANA_ACCESS_TOKEN: ${{ inputs.access-token }}
run: bundle exec fastlane run asana_get_release_automation_subtask_id task_url:"${{ inputs.task-url }}"

- id: get-asana-user-id
if: github.event_name != 'schedule'
Expand All @@ -40,8 +40,8 @@ runs:
shell: bash
env:
ASANA_ACCESS_TOKEN: ${{ inputs.access-token }}
ASSIGNEE_ID: ${{ steps.get-asana-user-id.outputs.user-id || steps.get-automation-subtask.outputs.assignee-id }}
TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
ASSIGNEE_ID: ${{ steps.get-asana-user-id.outputs.user-id || steps.get-automation-subtask.outputs.asana_assignee_id }}
TASK_ID: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
run: |
return_code=$(curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}/addFollowers" \
-H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \
Expand All @@ -59,6 +59,6 @@ runs:
uses: ./.github/actions/asana-add-comment
with:
access-token: ${{ inputs.access-token }}
task-id: ${{ steps.get-automation-subtask.outputs.automation-task-id }}
task-id: ${{ steps.get-automation-subtask.outputs.asana_automation_task_id }}
comment: ${{ inputs.comment }}
template-name: ${{ inputs.template-name }}
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation
revision: 5d267b66e9c63f879eecbb4ae1f40cb42547026e
tag: 0.2.0
revision: 936568643e0d295885af809aa9857448a4141a81
tag: 0.3.0
specs:
fastlane-plugin-ddg_apple_automation (0.2.0)
fastlane-plugin-ddg_apple_automation (0.3.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-ddg_apple_automation', git: 'https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation', tag: '0.2.0'
gem 'fastlane-plugin-ddg_apple_automation', git: 'https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation', tag: '0.3.0'

0 comments on commit 6197607

Please sign in to comment.