Open adamjjeffery opened 1 year ago
Same for me. Also need some insights on using jira list. I am trying to list issues with a specific summary. But none of the specified options work
@Kruthika0 - Try this instead...
- name: Setup
uses: atlassian/gajira-cli@v3
with:
version: 1.0.27
- name: Check ticket does not already exist
id: find
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
run: jira list --query "resolution=unresolved AND issuetype=Task AND summary~'${{ github.event.pull_request.title }}' AND project=ABC" --queryfields=issuetype,summary,priority,assignee,status,created,reporter,summary
It uses the ~
to see if the summary contains the given string.
@adamjjeffery I get this when I try the above - ERROR Invalid Usage: Post "rest/api/2/search": unsupported protocol scheme "" Despite providing JIRA_HOST
Try using these env vars instead, setting the JIRA_BASE_URL...
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
Same error :)
Looks you're going to have to do some Googling mate ;)
Same error :)
Are you providing the "https://" in your base url?
Same error :)
Are you providing the "https://" in your base url?
Yes!! Strangest thing is if I manually visit that URL from the browser, I am able to view the data. When I use gh-actions then I get this issue.
@adamjjeffery - I was doing a very trivial mistake. Got it resolved :) Thank you!
@adamjjeffery - I was doing a very trivial mistake. Got it resolved :) Thank you!
@Kruthika0 I'm having the exact same issue. Can you share what your fix was?
Just got it working for myself. For posterity, it seems the gajira-cli does not support the JIRA_BASE_URL
or JIRA_USER_EMAIL
environment variables. Instead I had to set endpoint
and user
in my .jira.d/config.yml
file, like so:
endpoint: https://mysubdomain.atlassian.net
user: my-github-actions-jira-bot@mysubdomain.net
The example provided here simply fails with the following error...