fastlane-plugin-wpmreleasetoolkit 13.5.0 → 13.5.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfff41f7e06514a598cedc9d3815b0465bb543a26af079ac775812b4a689a614
|
4
|
+
data.tar.gz: 0d5c9349d56212cfa16fd9b731fcdc5318e23e12e5a1bdf7a23e3f8acf755783
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a281df90be326b5c1153a4a8ab27b55c8105169a50123537b86e2ca14ab0ff26e237b0f572941530a9b443f9d457c420fe80a46a1f1cf88baf6b862ef13e7f
|
7
|
+
data.tar.gz: d797602e89698606bb0c5f65d22cf469fff16341a503c5f3f97caef623fb36744252f770fe9df9018cff5c0b566ad8fd1787d4fe55aba07955c3bbf2013b2f3a
|
@@ -44,14 +44,42 @@ module Fastlane
|
|
44
44
|
# @param [String] repository The repository name, including the organization (e.g. `wordpress-mobile/wordpress-ios`)
|
45
45
|
# @param [Sawyer::Resource, String] milestone The milestone object, or title of the milestone, we want to fetch the list of PRs for (e.g.: `16.9`)
|
46
46
|
# @param [Boolean] include_closed If set to true, will include both opened and closed PRs. Otherwise, will only include opened PRs.
|
47
|
-
# @return [Array<Sawyer::Resource>] A list of the PRs for the given milestone, sorted by number
|
47
|
+
# @return [Array<Sawyer::Resource>] A list of the PRs and issues for the given milestone, sorted by number
|
48
48
|
#
|
49
49
|
def get_prs_and_issues_for_milestone(repository:, milestone:, include_closed: false)
|
50
|
+
# While the `/search` API used with a classic tokens returns both issues and PRs, using a fine-grained tokens always require either 'is:issue' or 'is:pull-request',
|
51
|
+
# therefore we need to make two separate calls to cover both cases
|
52
|
+
issues = search_milestone_items(repository: repository, milestone: milestone, type: :issue, include_closed: include_closed)
|
53
|
+
prs = search_milestone_items(repository: repository, milestone: milestone, type: :pr, include_closed: include_closed)
|
54
|
+
|
55
|
+
(issues + prs).sort_by(&:number)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Search for issues or PRs for a given milestone
|
59
|
+
#
|
60
|
+
# @param [String] repository The repository name, including the organization (e.g. `wordpress-mobile/wordpress-ios`)
|
61
|
+
# @param [Sawyer::Resource, String] milestone The milestone object, or title of the milestone
|
62
|
+
# @param [Symbol] type The type of items to search for (:issue or :pr/:pull_request)
|
63
|
+
# @param [Boolean] include_closed If set to true, will include both opened and closed items. Otherwise, will only include opened items.
|
64
|
+
# @return [Array<Sawyer::Resource>] A list of issues or PRs for the given milestone
|
65
|
+
#
|
66
|
+
def search_milestone_items(repository:, milestone:, type:, include_closed: false)
|
50
67
|
milestone_title = milestone.is_a?(Sawyer::Resource) ? milestone.title : milestone
|
51
|
-
|
68
|
+
|
69
|
+
# Map type symbol to GitHub search qualifier
|
70
|
+
type_qualifier = case type
|
71
|
+
when :issue
|
72
|
+
'is:issue'
|
73
|
+
when :pr, :pull_request
|
74
|
+
'is:pull-request'
|
75
|
+
else
|
76
|
+
raise ArgumentError, "Invalid type: #{type}. Must be :issue or :pr"
|
77
|
+
end
|
78
|
+
|
79
|
+
query = %(repo:#{repository} milestone:"#{milestone_title}" #{type_qualifier})
|
52
80
|
query += ' is:open' unless include_closed
|
53
81
|
|
54
|
-
client.search_issues(query)[:items]
|
82
|
+
client.search_issues(query)[:items]
|
55
83
|
end
|
56
84
|
|
57
85
|
# Set/Update the milestone assigned to a given PR or issue
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-wpmreleasetoolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.5.
|
4
|
+
version: 13.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Automattic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|