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 +4 -4
- data/README.md +1 -1
- data/lib/superthread/cli/cards.rb +1 -1
- data/lib/superthread/cli/concerns/user_resolvable.rb +10 -0
- data/lib/superthread/cli/projects.rb +2 -2
- data/lib/superthread/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: 19963c25ec59017aeaa48f22fd6bbc61ff354c82a404bc5705b3b38ae7d34952
|
|
4
|
+
data.tar.gz: e1f03e1cda195ae9b696cd31862044f66b8a08cd1aac29aca86ea21b88bdf6f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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`
|
|
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
|
|
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
|
|
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
|
|
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"
|
data/lib/superthread/version.rb
CHANGED