Closed alanfzf closed 5 months ago
Thanks for reporting! Very interesting case, especially because you say the card is created. Are you able to reproduce this error consistently? Also, is the rest of the integration functioning as intended?
Please also double-check if your Trello list ID, API key and token are correct 🤔
I also released v9.2.3 with better error logging, you can try to upgrade so we could get more context :)
@alanfzf any updates?
Hello @ukupat , thanks for your response, i been a bit busy this week, but i hopefully will get back to you with a more documented issue, this weekend.
Hello @ukupat bumped to v9.2.3
and it seems that it can't find the board where the card belongs to, also i wasn't able to reproduce the card creation, bug.
I double checked, and it seems that api credentials were ok, as the cards get created when i manually put the trello url.
Im going to share what bits of the json im using to associate the trello board:
trello-board-id: 6621c337327b56c3ac6acbbc
trello-list-id-pr-open: 6621c337327b56c3ac6acbc3
trello-list-id-pr-closed: 6621c337327b56c3ac6acbc5
Oops, seems like the first action was sent with an incorrect idList
updated it and get this new error:
and was able to reproduce the issue, the card gets created, but fails to return the url:
Sharing the new log with all the details:
From what i can understand the issue, is occuring when the action, tries to update the body of the pull request, afaik, my action.yaml is configured correctly but here it is anyway:
name: Trello integration
on:
pull_request:
types: [opened, edited, closed, reopened, ready_for_review, converted_to_draft]
issue_comment:
types: [created, edited]
jobs:
trello:
runs-on: ubuntu-latest
environment: Test
steps:
- uses: rematocorp/trello-integration-action@v9.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-include-new-card-command: true
trello-api-key: ${{ secrets.TRELLO_API_KEY }}
trello-auth-token: ${{ secrets.TRELLO_AUTH_TOKEN }}
trello-board-id: 6621c337327b56c3ac6acbbc
trello-list-id-pr-open: 6621c337327b56c3ac6acbc3
trello-list-id-pr-closed: 6621c337327b56c3ac6acbc5
edit: solved it, you actually need to give write permissions in the action file for it to work.
name: Trello integration
on:
pull_request:
types: [opened, edited, closed, reopened, ready_for_review, converted_to_draft]
issue_comment:
types: [created, edited]
jobs:
trello:
runs-on: ubuntu-latest
permissions:
pull-requests: write
environment: Test
steps:
- uses: rematocorp/trello-integration-action@v9.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-include-new-card-command: true
trello-api-key: ${{ secrets.TRELLO_API_KEY }}
trello-auth-token: ${{ secrets.TRELLO_AUTH_TOKEN }}
trello-board-id: 6621c337327b56c3ac6acbbc
trello-list-id-pr-open: 6621c337327b56c3ac6acbc3
trello-list-id-pr-closed: 6621c337327b56c3ac6acbc5
Made small pr to add this info in the main readme file! 😄 thanks, for your time @ukupat !
Hmm interesting find. We use a custom token for github-token
with more permissions so I guess thats why we didn't encounter this problem. Thank you for the information and for the PR!
When the
/new-trello-card
command is used, the card gets moved in the trello board, but when trying to obtain the url it just fails.