marlens-jira-api 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/marlens/jira_api/client.rb +10 -0
- data/lib/marlens/jira_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0cf8ed2ffd471d5f4c71da18861f1b4da2bb13e91192e61d36d1905139527fa
|
|
4
|
+
data.tar.gz: ab15b83bebe592a06b8d1f1636f6045cb2da32b39e2c4939f2207e3f7016c160
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5c66a4d1d404a4a3703ae18f80a71f56061003eac7b1eea824b9a3581aa7d7c5ada4808a43abcc39d7a94843a07a41ed8115048e7c2f7e25b044ae0ba2aea56
|
|
7
|
+
data.tar.gz: 44853c868153491b53f85549c6266a04a153162ddb0b998b0cfcd4381554de4917275a477fb3c9306aab660409c9d26e09285c0049b6d1b189cc6329da0ccc1c
|
data/README.md
CHANGED
|
@@ -21,6 +21,9 @@ client = Marlens::JiraApi::Client.new(
|
|
|
21
21
|
|
|
22
22
|
comments = client.list_comments(issue_key: "WRAPX-123")
|
|
23
23
|
comment = client.get_comment(issue_key: "WRAPX-123", comment_id: "10001")
|
|
24
|
+
issue = client.get_issue(issue_key: "WRAPX-123")
|
|
25
|
+
remote_links = client.list_remote_links(issue_key: "WRAPX-123")
|
|
26
|
+
|
|
24
27
|
|
|
25
28
|
created = client.create_markdown_comment(
|
|
26
29
|
issue_key: "WRAPX-123",
|
|
@@ -36,6 +39,10 @@ client.update_markdown_comment(
|
|
|
36
39
|
client.delete_comment(issue_key: "WRAPX-123", comment_id: created.fetch("id"))
|
|
37
40
|
```
|
|
38
41
|
|
|
42
|
+
### Read errors
|
|
43
|
+
|
|
44
|
+
`get_issue` and `list_remote_links` return parsed Jira JSON. A non-2xx response raises `RuntimeError` with the HTTP method, request path, status, and response body. A successful response with malformed JSON raises `JSON::ParserError`.
|
|
45
|
+
|
|
39
46
|
## CLI
|
|
40
47
|
|
|
41
48
|
Credentials are read from `JIRA_BASE_URL`, `JIRA_EMAIL`, and `JIRA_API_TOKEN`.
|
|
@@ -64,5 +71,5 @@ Preferred flow for issue and feature work:
|
|
|
64
71
|
6. Merge the PR to `main` so GitHub records the review path.
|
|
65
72
|
7. After merge, build and publish the gem version to RubyGems with `gem build marlens-jira-api.gemspec` and `gem push marlens-jira-api-<version>.gem`.
|
|
66
73
|
8. Verify RubyGems lists the released version with `gem list --remote marlens-jira-api --exact --all`; if that output is stale, verify the specific version API at `https://rubygems.org/api/v2/rubygems/marlens-jira-api/versions/<version>.json`.
|
|
67
|
-
9. Run an install or CLI smoke check against the published gem.
|
|
74
|
+
9. Run an install or CLI smoke check against the published gem in an isolated temporary gem home; the project uses `gemspec` through Bundler and does not need its own gem installed locally.
|
|
68
75
|
10. Keep one-off smoke cleanup helpers in `tmp/`, delete them before committing, and do not turn cleanup-only scripts into product API.
|
|
@@ -30,6 +30,16 @@ module Marlens
|
|
|
30
30
|
json_request(Net::HTTP::Get.new(uri), uri)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def get_issue(issue_key:)
|
|
34
|
+
uri = api_uri("/issue/#{issue_key}")
|
|
35
|
+
json_request(Net::HTTP::Get.new(uri), uri)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def list_remote_links(issue_key:)
|
|
39
|
+
uri = api_uri("/issue/#{issue_key}/remotelink")
|
|
40
|
+
json_request(Net::HTTP::Get.new(uri), uri)
|
|
41
|
+
end
|
|
42
|
+
|
|
33
43
|
def create_comment(issue_key:, document:)
|
|
34
44
|
uri = api_uri("/issue/#{issue_key}/comment")
|
|
35
45
|
request = Net::HTTP::Post.new(uri)
|