You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,9 +141,10 @@ lgtm-ai can enhance code reviews by including context from linked issues or user
141
141
142
142
- Provide the following options to the `lgtm review` command:
143
143
-`--issues-url`: The base URL of the issues or user story page.
144
-
-`--issues-source`: The platform for the issues (e.g., `github`, `gitlab`).
144
+
-`--issues-source`: The platform for the issues (e.g., `github`, `gitlab`, `jira`).
145
145
-`--issues-regex`: (Optional) A regex pattern to extract the issue ID from the PR title or description.
146
146
-`--issues-api-key`: (Optional) API key for the issues service (if different from `--git-api-key`).
147
+
-`--issues-user`: (Optional) Username for the issues service (required if source is `jira`).
147
148
148
149
**Example:**
149
150
```sh
@@ -161,7 +162,7 @@ lgtm review \
161
162
162
163
**Notes:**
163
164
164
-
-Only GitHuband GitLab issues are supported for now.
165
+
- GitHub, GitLab, and [JIRA cloud](https://developer.atlassian.com/cloud/jira/platform/)issues are supported.
165
166
- If `--issues-api-key` is not provided, lgtm will use `--git-api-key` for authentication.
166
167
- If no issue is found, the review will proceed without issue context.
167
168
- lgtm provides a default regex for extracting issue IDs that works with [conventional commits](https://www.conventionalcommits.org). This means you often do not need to specify `--issues-regex` if your PR titles or commit messages follow the conventional commit format (e.g., `feat(#123): add new feature`), or if your PR descriptions contain mentions to issues like: `refs: #123` or `closes: #123`.
@@ -392,6 +393,7 @@ When it comes to preference for selecting options, lgtm follows this preference
392
393
| issues_source | Issues Integration | 🟡 Conditionally required | Required if `issues_url` is set. |
393
394
| issues_regex | Issues Integration | 🟢 Optional | Regex for issue ID extraction. Defaults to conventional commit compatible regex. |
394
395
| issues_api_key | Issues Integration | 🟢 Optional | API key for issues service (if different from `git_api_key`). Can't be given through config file. Also available through env variable `LGTM_ISSUES_API_KEY`. |
396
+
| issues_user | Issues Integration | 🟡 Conditionally required | Username for accessing issues information. Only required for `issues_source=jira` |
395
397
396
398
</details>
397
399
@@ -423,9 +425,10 @@ These options are only used when performing reviews through the command `lgtm re
423
425
See [Using Issue/User Story Information section](#using-issueuser-story-information).
424
426
425
427
- **issues_url**: The base URL of the issues or user story page to fetch additional context for the PR. If set, `issues_source` becomes required.
426
-
- **issues_source**: The platform for the issues (e.g., `github`, `gitlab`). Required if `issues_url` is set.
428
+
- **issues_source**: The platform for the issues (e.g., `github`, `gitlab`, `jira`). Required if `issues_url` is set.
427
429
- **issues_regex**: A regex pattern to extract the issue ID from the PR title or description. If omitted, lgtm uses a default regex compatible with conventional commits and common PR formats.
428
430
- **issues_api_key**: API key for the issues service (if different from `git_api_key`). Can be given as a CLI argument, or as an environment variable (`LGTM_ISSUES_API_KEY`).
431
+
- **issues_user**: Username for accessing the issues service (only necessary for `jira`). Can be given as a CLI argument, or as an environment variable (`LGTM_ISSUES_USER`).
help="The optional API key to the issues service (Jira, GitLab, GitHub, etc.). If using GitHub or GitLab and not provided, `--git-api-key` will be used instead.",
119
121
)
122
+
@click.option(
123
+
"--issues-user",
124
+
help="The username to download issues information (only needed for Jira). Required if `--issues-source` is `jira`.",
f"An API key is required to access issues from {self.issues_source.value}. Please provide it via the --issues-api-key option or the LGTM_ISSUES_API_KEY environment variable."
0 commit comments