Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move some actions body to AsanaHelper + use ERB for processing templates #9

Merged
merged 17 commits into from
Sep 15, 2024

Conversation

ayoy
Copy link
Contributor

@ayoy ayoy commented Sep 13, 2024

Summary of changes:

  • Simple Asana actions' implementation was moved to a dedicated AsanaHelper
    as functions: extract_asana_task_id, extract_asana_task_assignee,
    get_release_automation_subtask_id, get_asana_user_id_for_github_handle,
    upload_file_to_asana_task. Actions only call their respective helper method.
    This is to simplify using these functionalities from other actions (better not
    call action from action, but rather use helpers for common functionality).
  • asana_add_comment, asana_log_message and asana_create_action_item actions
    now use ERB for processing templates. They take template_args Hash argument
    that provides template variables. For backward compatibility, environment variables
    are currently merged to template_args (with their keys lowercased), so that call
    sites in GHA workflows don't have to be updated. Future workflows implemented in
    fastlane will be able to use template_args with lowercased parameter names and
    eventually we'll remove the environment workaround.
  • Unit tests were added for all templates, to verify that they're processed correctly.

@ayoy ayoy force-pushed the dominik/asana-extract-task-id-helper branch from 39301d9 to df62b1d Compare September 14, 2024 10:34
@ayoy ayoy changed the title Move asana_extract_task_id action body to a helper function Move some actions body to AsanaHelper + use ERB for processing templates Sep 15, 2024
@ayoy ayoy merged commit d106641 into main Sep 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants