diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fc0683e..a00e550 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Asana Github Pull Request Link - uses: ExodusMovement/asana-actions@1.0.17 + uses: ExodusMovement/asana-actions@1.0.18 with: token: ${{ secrets.ASANA_TOKEN }} workspace: ${{ secrets.ASANA_WORKSPACE_ID }} \ No newline at end of file diff --git a/README.md b/README.md index 9fb90ba..6751e8e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Asana Github Pull Request Link - uses: ExodusMovement/asana-actions@1.0.17 + uses: ExodusMovement/asana-actions@1.0.18 with: token: ${{ secrets.ASANA_TOKEN }} workspace: ${{ secrets.ASANA_WORKSPACE_ID }} diff --git a/asana.js b/asana.js index ab00a47..639426b 100644 --- a/asana.js +++ b/asana.js @@ -5,7 +5,8 @@ const xmlescape = require('xml-escape') const fetch = (token) => { return fetchival('https://app.asana.com/api/1.0', { headers: { - Authorization: 'Bearer ' + token + Authorization: 'Bearer ' + token, + "content-type": "application/json" } }) } @@ -31,7 +32,7 @@ module.exports.completeAsanaTask = async function (token, gid, id) { 'completed': true } } - const url = 'tasks/' + gid + const url = 'tasks/' + id await fetch(token)(url).put(data) }