plan_my_stuff 1.0.1 → 1.0.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/CHANGELOG.md +8 -0
- data/lib/plan_my_stuff/issue.rb +8 -1
- data/lib/plan_my_stuff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b0b4807143a42fc7a7b667b6023f182e6bfe5601c9302d7044c7e30b4dab5db
|
|
4
|
+
data.tar.gz: 19c3cb2b4ab0156d01b2ec1a1f52086c1299f3171a2284fa0df995d163b17bb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5de35eb3a9b45ba810df2b786081d9cc3988f46048ac94b8df9c65887c71103bc2b4de1b5c4eeb0fa7bb49156c4eb405fdc0fe368764f5b86d7de977dd7f5449
|
|
7
|
+
data.tar.gz: 268532412c45fbeceeeae220870ec19bddf150644ac23689f680cd4f0fe97bce5161decd56ae85bb72343160abc5ae3cb585e5b55129e38455e604e385013847
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `Issue.new` now accepts `issue_fields:` without erroring, staging the values for the next `save!`
|
|
8
|
+
- `Issue#issue_fields` no longer crashes on unpersisted records; it returns the pending values passed to `.new` so a
|
|
9
|
+
failed `new` form can be re-rendered without losing the user's Issue Field selections
|
|
10
|
+
|
|
3
11
|
## 1.0.1
|
|
4
12
|
|
|
5
13
|
### Fixed
|
data/lib/plan_my_stuff/issue.rb
CHANGED
|
@@ -808,6 +808,7 @@ module PlanMyStuff
|
|
|
808
808
|
|
|
809
809
|
def initialize(**attrs)
|
|
810
810
|
@body_dirty = false
|
|
811
|
+
@pending_issue_fields = attrs.delete(:issue_fields) if attrs.key?(:issue_fields)
|
|
811
812
|
super
|
|
812
813
|
end
|
|
813
814
|
|
|
@@ -1049,7 +1050,9 @@ module PlanMyStuff
|
|
|
1049
1050
|
|
|
1050
1051
|
# Returns a hash-like view of GitHub Issue Field values currently set on this issue. Reads on first access and
|
|
1051
1052
|
# memoizes; +set_issue_fields!+ invalidates the cache. Returns an empty set without making a request when
|
|
1052
|
-
# +config.issue_fields_enabled+ is +false+.
|
|
1053
|
+
# +config.issue_fields_enabled+ is +false+. For unpersisted records, returns the pending values passed to +.new+
|
|
1054
|
+
# (the raw consumer-supplied hash) without making a request, so a failed +new+ form can be re-rendered without
|
|
1055
|
+
# losing the user's input.
|
|
1053
1056
|
#
|
|
1054
1057
|
# @return [PlanMyStuff::IssueFieldValueSet]
|
|
1055
1058
|
#
|
|
@@ -1376,6 +1379,10 @@ module PlanMyStuff
|
|
|
1376
1379
|
def load_issue_fields!
|
|
1377
1380
|
return PlanMyStuff::IssueFieldValueSet.new({}) unless PlanMyStuff.configuration.issue_fields_enabled
|
|
1378
1381
|
|
|
1382
|
+
# Unpersisted records have no values on GitHub yet. Surface the pending values passed to +.new+ / +update!+
|
|
1383
|
+
# so a consuming app can re-render a failed "new" form without losing the user's Issue Field selections.
|
|
1384
|
+
return PlanMyStuff::IssueFieldValueSet.new((@pending_issue_fields || {}).transform_keys(&:to_s)) if new_record?
|
|
1385
|
+
|
|
1379
1386
|
data = PlanMyStuff.client.graphql(
|
|
1380
1387
|
PlanMyStuff::GraphQL::Queries::READ_ISSUE_FIELD_VALUES,
|
|
1381
1388
|
variables: { owner: repo.organization, name: repo.name, number: number },
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plan_my_stuff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brands Insurance
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|