bugsink-cli 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 332213d0fe5dd0cffa80562ed080efcf15df8efb3a33d9efd6916bd5f3b86558
4
- data.tar.gz: 752a775192b2bf8d719a1ac18b4916a8f619159b1dda6df6702a7e27adc8302a
3
+ metadata.gz: b89224f3bcb9eb69b009ea2f9ac7c4c95670130dc71aaa9bd001ef146f015b27
4
+ data.tar.gz: 051e79e4933a9150de8dd9383d8ccaa8550ba9ddc12424808c1dab60f61d8af6
5
5
  SHA512:
6
- metadata.gz: 8be23b51ee505b803159e7aae993b91f091c21124980202f4a2e833f485b5faa3201ff41a7d3d74b499be1ddd7ef09de06c1a986238cf61a872869bae7a3bf1e
7
- data.tar.gz: 5fcc6bcf7b826c2779879c4f9634393934d803c85951d9671e04d466aadbc31b35acab7bf800673135815d7977d92a6ed156cf3f40a42c4ff95cadc71e889724
6
+ metadata.gz: fd7e41a833fbbf36c268b731128a27335321496f2b90a6dec08e83e4788f244bea60ee1cac43117ecd3ab771d535af5f908f448402cd0ba663f8a32990ee1678
7
+ data.tar.gz: 8ca173e5b7280f9940dd57bcc157771f05319a1378c0a902ea94f9bade34f4bf0e9edd4d0952fb412f8892465c501179bbb22639b43f912c20dbc0cf18cfafeb
data/README.md CHANGED
@@ -126,7 +126,7 @@ bugsink projects create '{
126
126
  bugsink projects update <id> '{"name":"New Name","alert_on_new_issue":false}'
127
127
  ```
128
128
 
129
- #### Issues (Read-Only)
129
+ #### Issues
130
130
 
131
131
  ```bash
132
132
  # List issues for a project
@@ -137,9 +137,12 @@ bugsink issues list --project=<id> \
137
137
 
138
138
  # Get issue details
139
139
  bugsink issues get <uuid> [--json]
140
+
141
+ # Resolve an issue
142
+ bugsink issues resolve <uuid> [--json]
140
143
  ```
141
144
 
142
- **Note:** Issues are **read-only** via the API. You cannot update status, resolve, or add comments through the CLI.
145
+ **Note:** The `resolve` command requires [bugsink-fork](https://github.com/landovsky/bugsink-fork), which adds the resolve API endpoint. Using it against upstream BugSink will return a 404 error.
143
146
 
144
147
  #### Events (Read-Only)
145
148
 
@@ -266,11 +269,11 @@ ee4f4572-0957-4346-b433-3c605acbfa2a
266
269
 
267
270
  - **Teams:** Create, Update
268
271
  - **Projects:** Create, Update
272
+ - **Issues:** Resolve (requires [bugsink-fork](https://github.com/landovsky/bugsink-fork))
269
273
  - **Releases:** Create
270
274
 
271
275
  ### Read-Only Resources
272
276
 
273
- - **Issues:** Cannot update status, resolve, or add comments
274
277
  - **Events:** Created automatically via Sentry SDK ingestion only
275
278
 
276
279
  ### Not Supported
@@ -297,6 +300,9 @@ teams = response.data
297
300
  # Get project
298
301
  project = client.project_get(8)
299
302
 
303
+ # Resolve an issue (requires bugsink-fork)
304
+ issue = client.issue_resolve('issue-uuid')
305
+
300
306
  # Create release
301
307
  release = client.release_create(
302
308
  project_id: 8,
data/lib/bugsink/cli.rb CHANGED
@@ -191,9 +191,18 @@ module Bugsink
191
191
  parse_format_options!(args[1..] || [])
192
192
  issue = @client.issue_get(uuid)
193
193
  output_single(issue, format: @options[:format])
194
+ when 'resolve'
195
+ uuid = args[0]
196
+ unless uuid
197
+ error('Issue UUID required')
198
+ exit 1
199
+ end
200
+ parse_format_options!(args[1..] || [])
201
+ issue = @client.issue_resolve(uuid)
202
+ output_single(issue, format: @options[:format])
203
+ success("Issue #{uuid} resolved")
194
204
  else
195
205
  error("Unknown issues action: #{action}")
196
- info('Note: Issues are read-only. Write operations not available in API.')
197
206
  exit 1
198
207
  end
199
208
  end
@@ -391,7 +400,7 @@ module Bugsink
391
400
  config - Configuration management
392
401
  teams - Team operations
393
402
  projects - Project operations
394
- issues - Issue operations (read-only)
403
+ issues - Issue operations
395
404
  events - Event operations (read-only)
396
405
  releases - Release operations
397
406
 
@@ -413,6 +422,7 @@ module Bugsink
413
422
 
414
423
  bugsink issues list --project=<id> List issues for project
415
424
  bugsink issues get <uuid> Get issue details
425
+ bugsink issues resolve <uuid> Resolve an issue
416
426
 
417
427
  bugsink events list --issue=<uuid> List events for issue
418
428
  bugsink events stacktrace <uuid> Get formatted stacktrace
@@ -443,7 +453,7 @@ module Bugsink
443
453
  # Get stacktrace for an event
444
454
  bugsink events stacktrace <event-uuid>
445
455
 
446
- Note: Issues and Events are READ-ONLY via the API. Write operations are not supported.
456
+ Note: Events are READ-ONLY via the API.
447
457
  HELP
448
458
  end
449
459
 
@@ -518,11 +528,12 @@ module Bugsink
518
528
  HELP
519
529
  when 'issues'
520
530
  puts <<~HELP
521
- bugsink issues - Issue operations (READ-ONLY)
531
+ bugsink issues - Issue operations
522
532
 
523
533
  Actions:
524
534
  list --project=<id> [--sort=<field>] [--order=<asc|desc>]
525
535
  get <uuid>
536
+ resolve <uuid>
526
537
 
527
538
  Options:
528
539
  --project=<id> Project ID (required for list)
@@ -532,8 +543,9 @@ module Bugsink
532
543
  Examples:
533
544
  bugsink issues list --project=8 --sort=last_seen --order=desc
534
545
  bugsink issues get <uuid> --json
546
+ bugsink issues resolve <uuid>
535
547
 
536
- Note: Issues are READ-ONLY. No write operations available in API.
548
+ Note: Resolve returns 409 if the issue is already resolved.
537
549
  HELP
538
550
  when 'events'
539
551
  puts <<~HELP
@@ -165,6 +165,12 @@ module Bugsink
165
165
  response.parsed_response
166
166
  end
167
167
 
168
+ def issue_resolve(uuid)
169
+ response = self.class.post("/api/canonical/0/issues/#{uuid}/resolve/")
170
+ check_response(response)
171
+ response.parsed_response
172
+ end
173
+
168
174
  # Events
169
175
  def events_list(issue_uuid:, order: 'desc', limit: 250, cursor: nil)
170
176
  query = {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bugsink
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsink-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Kopernik