Skip to content

How to pass an Asana task ID through the branch name #7

@DmitrySalnikov

Description

@DmitrySalnikov

I tried to take the task ID from the PR branch name, for that I parsed the name and updated the PR body in step 1, so step 2 should find a link to the task in the body. But it seems that it get the data as it was when the workflow was triggered.

Is there a possibility to reload the data and pass it to the second step, or any other solutions?

on:
  pull_request:
    types: [opened]

jobs:
  create-asana-attachment-job:
    runs-on: ubuntu-latest
    name: Create pull request attachments on Asana tasks
    steps:
      - name: Create comment with the link to Asana taks
        uses: tzkhan/pr-update-action@v2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          head-branch-regex: '\d{16}'
          body-template: https://app.asana.com/0/1201376205424374/%headbranch%
      - name: Create pull request attachments
        uses: Asana/create-app-attachment-github-action@latest
        id: postAttachment
        with:
          asana-secret: ${{ secrets.ASANA_SECRET }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions