fastlane-plugin-wpmreleasetoolkit 13.5.0 → 13.5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b2482314dd0f766ed17163b49308b9054982c3e85bcf017310611e53d43155c
|
4
|
+
data.tar.gz: b942e2a2c4d0778420d2f15ec35d6a8b9f2718d237bb687aeb5ee6b6cdae86e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c033a332896e9151be106d316960beecb8f275bfa14865ff716e663508318ef29240ee668507436337e8a16bb80ef296ae31abb7ca774597f1f3ea014c123489
|
7
|
+
data.tar.gz: 4120e9a3d1c7974959b6c2a6b950ec827ea23c524535fb754c2c9130f95395f65f0ca202adb9fc93e5c94f36b34212512dc389022ea487d2e31b726991484a7d
|
@@ -124,6 +124,7 @@ module Fastlane
|
|
124
124
|
# When a callback was provided, do the pre-check about valid PR _only_ at that point, in case the callback added new commits
|
125
125
|
unless can_merge?(intermediate_branch, into: base_branch)
|
126
126
|
UI.error("Nothing to merge from #{intermediate_branch} into #{base_branch}. Skipping PR creation.")
|
127
|
+
Action.sh('git', 'checkout', head_branch) # Switch to original branch so we can delete the intermediate branch
|
127
128
|
Fastlane::Helper::GitHelper.delete_local_branch_if_exists!(intermediate_branch)
|
128
129
|
return nil
|
129
130
|
end
|
@@ -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.2
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|