superthread 0.9.1 → 0.9.2

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: 764ae1eedbe67d7c951c99b3cf3269cbeb11d51ab8e905348a52a18124459877
4
- data.tar.gz: 01e80e6cb854aeb2a58f0c864a18ef3c0fbe26a56bb43bc10c5058b8c3d96216
3
+ metadata.gz: 19963c25ec59017aeaa48f22fd6bbc61ff354c82a404bc5705b3b38ae7d34952
4
+ data.tar.gz: e1f03e1cda195ae9b696cd31862044f66b8a08cd1aac29aca86ea21b88bdf6f7
5
5
  SHA512:
6
- metadata.gz: 58bbc5745f81aa529127ae86148ddc0e0d55334af6c73896633e5ed02ffd8762ff00ab7991fb3df3a0c7ca15ebc9f269e05c90e55a48ad282ce71992477332b1
7
- data.tar.gz: ca562a028c48552b3ca6ba1d146dc0f02c9544ae91a33b0f252b8018b4a77abc315743f1c258e95e93d596a38eb3cc6f990d7a9b7b76be307429a1a266357f84
6
+ metadata.gz: 122e2e4481e6da0544b311ca0c7009fb85de3f7133a514eee13d9d9be9154ebbe246515e42fcd634d0029e17de1c509688c7d63ab3f19663212476dfabf0174e
7
+ data.tar.gz: 0553d576f89d0cfc827c137a2f238fef23fb664a21a1cd413b1203eeb782e643a3c82bb86efd8ff93202186f5226a79dfad5158289820e9e6140a6baa1c41323
data/README.md CHANGED
@@ -325,7 +325,7 @@ Common options have short forms:
325
325
  > - Most commands accept **names or IDs** for spaces, boards, lists, sprints, users, and tags
326
326
  > - Use `-s SPACE` to help when board or list names are unclear
327
327
  > - Use `--json` for scripted output: `suth cards assigned me --json`
328
- > - Use `me` as a shortcut: `suth cards assigned me`
328
+ > - Use `me` in any user argument: `suth cards assigned me`, `suth cards assign CARD me`, `--owner me`
329
329
  > - Priority levels: 1=Urgent, 2=High, 3=Medium, 4=Low
330
330
 
331
331
  ### Mentions
@@ -179,7 +179,7 @@ module Superthread
179
179
  option :priority, type: :numeric, desc: "Priority level (1=low, 4=urgent)"
180
180
  option :parent_card, type: :string, desc: "Parent card ID"
181
181
  option :epic, type: :string, desc: "Epic ID"
182
- option :owner, type: :string, aliases: "-o", desc: "Owner (user ID, name, or email)"
182
+ option :owner, type: :string, aliases: "-o", desc: "Owner (user ID, name, email, or 'me')"
183
183
  # Create a new card on a board or sprint.
184
184
  #
185
185
  # @return [void]
@@ -21,6 +21,9 @@ module Superthread
21
21
  # @raise [Thor::Error] if name/email is provided but not found
22
22
  def resolve_user(ref)
23
23
  return ref if ref.nil?
24
+
25
+ return resolve_me if ref.downcase == "me"
26
+
24
27
  return ref if looks_like_id?(ref)
25
28
 
26
29
  user = find_user_by_name(ref)
@@ -29,6 +32,13 @@ module Superthread
29
32
  raise Thor::Error, "User not found: '#{ref}'. Use 'suth members list' to see available users."
30
33
  end
31
34
 
35
+ # Resolve 'me' to the current user's identifier (cached).
36
+ #
37
+ # @return [String] the current user's identifier
38
+ def resolve_me
39
+ @me_cache ||= client.users.me.user_identifier
40
+ end
41
+
32
42
  # Get cached workspace members list.
33
43
  #
34
44
  # @return [Array<Superthread::Models::User>] all workspace members
@@ -42,7 +42,7 @@ module Superthread
42
42
  option :content, type: :string, desc: "Project description"
43
43
  option :start_date, type: :numeric, desc: "Start date (Unix timestamp)"
44
44
  option :due_date, type: :numeric, desc: "Due date (Unix timestamp)"
45
- option :owner, type: :string, aliases: "-o", desc: "Owner (user ID, name, or email)"
45
+ option :owner, type: :string, aliases: "-o", desc: "Owner (user ID, name, email, or 'me')"
46
46
  option :priority, type: :numeric, desc: "Priority level"
47
47
  # Creates a new project on a board list.
48
48
  #
@@ -60,7 +60,7 @@ module Superthread
60
60
  option :list, type: :string, aliases: "-l", desc: "Destination list (ID or name, requires --board)"
61
61
  option :board, type: :string, aliases: "-b", desc: "Board (helps resolve list name)"
62
62
  option :space, type: :string, aliases: "-s", desc: "Space (helps resolve board name)"
63
- option :owner, type: :string, aliases: "-o", desc: "New owner (user ID, name, or email)"
63
+ option :owner, type: :string, aliases: "-o", desc: "New owner (user ID, name, email, or 'me')"
64
64
  option :start_date, type: :numeric, desc: "Start date"
65
65
  option :due_date, type: :numeric, desc: "Due date"
66
66
  option :priority, type: :numeric, desc: "Priority"
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Superthread
4
4
  # Current version of the Superthread gem.
5
- VERSION = "0.9.1"
5
+ VERSION = "0.9.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superthread
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Clarke