cchantep/probot-jira

project name is not used in issue search

Closed this issue · 3 comments

I nave specified project name, but according to logs, it is not connected with issue number when search is performed

Run cchantep/probot-jira@ghaction-1.0.18
  with:
  env:
    GITHUB_TOKEN: ***
    PERSONAL_TOKEN_VALUE: ***,
    PERSONAL_TOKEN_USER: startupuser
    JIRA_API_TOKEN: ***
    JIRA_DOMAIN: mystartup.atlassian.net/
    JIRA_USER: jira@mystartup.com
    JIRA_PROJECT_NAME: PRJ
...
15:50:03.978Z  INFO event: Pull request #4 corresponds to JIRA issue 8180 (id=29ad0ee0-627b-4a99-ae47-9cc4116c0980)
15:50:04.024Z  INFO event: JIRA hook already exists for LEGALOGIC_ENV-STATUS-TABLE (id=29ad0ee0-627b-4a99-ae47-9cc4116c0980)
15:50:04.225Z  INFO event: No JIRA issue '8180' corresponding to pull request #4 (id=29ad0ee0-627b-4a99-ae47-9cc4116c0980)

The JIRA key there is extracted from the PR title using issueKeyRegex, so make sure the title is properly formatted.

Ok, but if I don't have project name in my PR title(we don't have, cause its the same project for all PRs), isn't it possible to combine JIRA_PROJECT_NAME and task id to get the final key?
Otherwise, why we ever need to specify JIRA_PROJECT_NAME?

Would be great to add this options – to reuse project name and extract only issue id from the PR name

Point taken. That said, that's not planned to implement such option, as having the full key in the PR title seems a good practice and avoid code complexity. Thx for your feedback.