plan_my_stuff 0.21.1 → 0.22.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/CHANGELOG.md +13 -0
- data/lib/plan_my_stuff/issue.rb +29 -0
- data/lib/plan_my_stuff/issue_metadata.rb +4 -3
- data/lib/plan_my_stuff/version.rb +2 -2
- 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: d44fbaa2722319a0d586bf8f947222aa76f74462b5516f516f34b87b89ff6211
|
|
4
|
+
data.tar.gz: 05eaab50eaca5856a19cd68f796b1b4170cb750a6bb8c78566c003a576707122
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afbbeca592468025940d1b98eae3c93da09ca79a5406afe5d500f93e8d1803c59d8ced137c81b1e05297678de17920681756983cd0b2a4c253900897f4d5d9b5
|
|
7
|
+
data.tar.gz: 95ca844953334f3d514c1b530cac5837307b3b735975c18256ab09ad408e1e4aea1f964de8d43ffe4c6b74bdf17284f93d8f114f7e47c4ecb37484023278b28e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.22.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `Issue#add_to_priority_list!(priority:)` and `Issue#remove_from_priority_list!` - first-class setters that
|
|
8
|
+
mirror the `#priority_list?` / `#priority_list_priority` readers. Each writes both `Priority List` and
|
|
9
|
+
`Priority List Priority` in a single mutation so the two fields cannot drift apart (closes #80).
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `IssueMetadata#priority_list` / `#priority_list_priority` deprecation message now points callers at the new
|
|
14
|
+
`Issue#add_to_priority_list!` / `#remove_from_priority_list!` pair instead of raw `set_issue_fields!`.
|
|
15
|
+
|
|
3
16
|
## 0.21.1
|
|
4
17
|
|
|
5
18
|
### Added
|
data/lib/plan_my_stuff/issue.rb
CHANGED
|
@@ -842,6 +842,35 @@ module PlanMyStuff
|
|
|
842
842
|
issue_fields['Priority List Priority']
|
|
843
843
|
end
|
|
844
844
|
|
|
845
|
+
# Adds this issue to the Priority List at the given priority (or re-prioritizes if already listed). Sets
|
|
846
|
+
# +Priority List+ and +Priority List Priority+ together in a single +setIssueFieldValue+ mutation so the two
|
|
847
|
+
# fields never drift out of sync.
|
|
848
|
+
#
|
|
849
|
+
# @raise [PlanMyStuff::IssueFieldsNotEnabledError] when +config.issue_fields_enabled+ is +false+
|
|
850
|
+
#
|
|
851
|
+
# @param priority [Integer]
|
|
852
|
+
#
|
|
853
|
+
# @return [self]
|
|
854
|
+
#
|
|
855
|
+
def add_to_priority_list!(priority:)
|
|
856
|
+
raise(ArgumentError, 'Priority must be an integer') unless priority.is_a?(Integer)
|
|
857
|
+
|
|
858
|
+
set_issue_fields!('Priority List' => 'Yes', 'Priority List Priority' => priority)
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
alias update_priority_list_priority! add_to_priority_list!
|
|
862
|
+
|
|
863
|
+
# Removes this issue from the Priority List. Clears both +Priority List+ and +Priority List Priority+ in a single
|
|
864
|
+
# +setIssueFieldValue+ mutation so the two fields never drift out of sync.
|
|
865
|
+
#
|
|
866
|
+
# @raise [PlanMyStuff::IssueFieldsNotEnabledError] when +config.issue_fields_enabled+ is +false+
|
|
867
|
+
#
|
|
868
|
+
# @return [self]
|
|
869
|
+
#
|
|
870
|
+
def remove_from_priority_list!
|
|
871
|
+
set_issue_fields!('Priority List' => nil, 'Priority List Priority' => nil)
|
|
872
|
+
end
|
|
873
|
+
|
|
845
874
|
# Bulk-updates GitHub Issue Field values in a single +setIssueFieldValue+ mutation. Each key is the field display
|
|
846
875
|
# name; values are coerced to the right input fragment based on the field's type. Passing +nil+ as a value clears
|
|
847
876
|
# that field.
|
|
@@ -5,7 +5,8 @@ module PlanMyStuff
|
|
|
5
5
|
PRIORITY_LIST_METADATA_DEPRECATION =
|
|
6
6
|
'PlanMyStuff: IssueMetadata#priority_list / #priority_list_priority are deprecated. priority_list moved to ' \
|
|
7
7
|
"GitHub Issue Fields ('Priority List' single_select, 'Priority List Priority' number) in 0.20.0. Reads " \
|
|
8
|
-
'now come from
|
|
8
|
+
'now come from Issue#priority_list? / #priority_list_priority; for writes, use ' \
|
|
9
|
+
'Issue#add_to_priority_list!(priority: N) and Issue#remove_from_priority_list!. The metadata accessors ' \
|
|
9
10
|
'will be removed in 1.0.0.'
|
|
10
11
|
|
|
11
12
|
# @return [Time, nil] first support action timestamp, nil until set
|
|
@@ -201,7 +202,7 @@ module PlanMyStuff
|
|
|
201
202
|
@priority_list
|
|
202
203
|
end
|
|
203
204
|
|
|
204
|
-
# @deprecated Use +Issue#
|
|
205
|
+
# @deprecated Use +Issue#add_to_priority_list!(priority: N)+ / +Issue#remove_from_priority_list!+. Removed in 1.0.0.
|
|
205
206
|
#
|
|
206
207
|
# @param value [Object]
|
|
207
208
|
#
|
|
@@ -231,7 +232,7 @@ module PlanMyStuff
|
|
|
231
232
|
@priority_list_priority
|
|
232
233
|
end
|
|
233
234
|
|
|
234
|
-
# @deprecated Use +Issue#
|
|
235
|
+
# @deprecated Use +Issue#add_to_priority_list!(priority: N)+ / +Issue#remove_from_priority_list!+. Removed in 1.0.0.
|
|
235
236
|
#
|
|
236
237
|
# @param value [Object]
|
|
237
238
|
#
|