I’m working on YouTrack Integration with GitHub.
My aim is to ensure that when a pull request is merged, the corresponding card moves from column “In Review” to column “Done”.
I’m currently trying to achieve it via action-youtrack-move
Workflow code is:
name: youtrack
on:
pull_request:
types: [closed]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: bloobirds-it/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yt-url: ${{ secrets.YOUTRACK_URL }}
yt-token: ${{ secrets.YOUTRACK_TOKEN }}
yt-project-id: "JSSAPI"
yt-column-target: "Done"
yt-column-triggers: "In Review"
But I get an error:
Run bloobirds-it/[email protected]
with:
github-token: ***
yt-url: ***
yt-token: ***
yt-project-id: JSSAPI
yt-column-target: Done
yt-column-triggers: In Review
yt-column-field: Stage
Checking /JSSAPI-[0-9] /g against the PR description
TypeError: Cannot read property 'matchAll' of null
at getMatchingTickets (/home/runner/work/_actions/bloobirds-it/action-youtrack-move/v1.0.0/dist/index.js:1003:35)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async run (/home/runner/work/_actions/bloobirds-it/action-youtrack-move/v1.0.0/dist/index.js:933:21)
Error: Cannot read property 'matchAll' of null
How can this problem be fixed? And, perhaps, you can suggest simpler and more efficient ways to achieve the goal I have indicated.
I reconnected the GitHub integration with the YouTrack project and it works correctly, i.e. the card displays the commits of the corresponding pull request.
I also checked all the tokens for validity, as well as the correctness of the links, although, based on the error message, this is not the case. The names of the columns, as far as I can see, are also entered correctly.
CodePudding user response:
Wouldn't it be easier to use commands in merge requests? Use "#Issue-ID Done" in the comment, and the issue's state should be changed.