sashimi_tanpopo 0.5.3 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0d1149ffe9c72e8e48871e591e94b12fb425e2fa7711492f1ebfca66b0d7902
4
- data.tar.gz: 435f11a5703276124de05e0185d3582bc00628ff63ca38e6dee27287c47ff9b5
3
+ metadata.gz: 6b36e2f5d140af8d4e11e1097b3a7dab1ed2798a673d2437a614939253469850
4
+ data.tar.gz: 2fe9febe7e6fa9ccce52ff6b0147302da25c0aae50d1bc156432cec9cae0eeea
5
5
  SHA512:
6
- metadata.gz: 40689113e1ad9644efb26559eee75d01d96a97a8a20a1d652811800e07966fa6fce63c0074beb1315a0e146221c057c82c715e77bd94e5d9261d6110328d330f
7
- data.tar.gz: 4d3b1c5c9fdccf8f85eb6434308fb2ed6a1878ffca56cb9ada581f2821ad27ef1beb2b5837b3bc11a6c9418ad475a11a18edeb3d77822e45fe23a9a94fead627
6
+ metadata.gz: de804b35f34790baf39efb4fb89d9f6795c969b3bb8a91d870423923933225addf108578d9379c96a8923e6fe004333a6a474f9eead8fe3cb4f7e999a7079709
7
+ data.tar.gz: 19c3124ddd713e7b01b2d26238920c2119e36b2ee1a306f8a36315cee7d942d6184c1051332d2e8beb82591cdfcabee958c391593f72bc8aa7e109ed325b5e2f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  ## [Unreleased]
2
- [full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.5.3...main)
2
+ [full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.6.0...main)
3
+
4
+ ## [v0.6.0](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.6.0) - 2026-01-12
5
+ [full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.5.4...v0.6.0)
6
+
7
+ * Add `--pr-auto-merge` to `sashimi_tanpopo github`
8
+ * https://github.com/sue445/sashimi_tanpopo/pull/111
9
+
10
+ ## [v0.5.4](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.5.4) - 2025-12-30
11
+ [full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.5.3...v0.5.4)
12
+
13
+ * Fixed problem where not all changes were applied when passing multiple recipes
14
+ * https://github.com/sue445/sashimi_tanpopo/pull/103
15
+ * Upgrade to Ruby 4.0 in Dockerfile
16
+ * https://github.com/sue445/sashimi_tanpopo/pull/102
3
17
 
4
18
  ## [v0.5.3](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.5.3) - 2025-12-07
5
19
  [full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.5.2...v0.5.3)
data/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
- ARG RUBY_VERSION=3.4
1
+ ARG RUBY_VERSION=4.0
2
2
  FROM ruby:${RUBY_VERSION}-alpine
3
3
 
4
- ARG SASHIMI_TANPOPO_VERSION=0.5.2
4
+ ARG SASHIMI_TANPOPO_VERSION=0.6.0
5
5
 
6
6
  WORKDIR /work
7
7
 
data/README.md CHANGED
@@ -106,6 +106,8 @@ Options:
106
106
  [--pr-labels=one two three] # Pull Request labels
107
107
  [--pr-draft], [--no-pr-draft], [--skip-pr-draft] # Whether to create draft Pull Request
108
108
  # Default: false
109
+ [--pr-auto-merge], [--no-pr-auto-merge], [--skip-pr-auto-merge] # Whether to auto-merge to Pull Request
110
+ # Default: false
109
111
  ```
110
112
 
111
113
  `--github-token` requires followings repository permissions
data/Rakefile CHANGED
@@ -36,6 +36,6 @@ task :fix_version do
36
36
  end
37
37
 
38
38
  # Run fix_version before release:source_control_push (inside of release task)
39
- Rake::Task["release:source_control_push"].enhance([:fix_version])
39
+ Rake::Task["release:source_control_push"].enhance([:fix_version]) unless ENV["CI"]
40
40
 
41
41
  task default: %i[spec rbs]
data/docs/RECIPE.md CHANGED
@@ -41,21 +41,24 @@ params
41
41
  ```
42
42
 
43
43
  ### `update_file`
44
- Update files if exists
44
+ Update files
45
45
 
46
46
  ```ruby
47
- # Update single file
47
+ # Update single file if exists
48
48
  update_file "test.txt" do |content|
49
49
  content.gsub!("name", params[:name])
50
50
  end
51
51
 
52
- # Update multiple files
52
+ # Update multiple files if exists
53
53
  update_file ".github/workflows/*.yml" do |content|
54
54
  content.gsub!(/ruby-version: "(.+)"/, %Q{ruby-version: "#{params[:ruby_version]}"})
55
55
  end
56
56
 
57
57
  # Create new file if file doesn’t exist
58
58
  update_file "new_file.txt", create: true do |content|
59
+ # content
60
+ # # => ""
61
+
59
62
  content.replace("My name is " + params[:name])
60
63
  end
61
64
  ```
@@ -51,6 +51,7 @@ module SashimiTanpopo
51
51
  option :pr_reviewers, type: :array, desc: "Pull Request reviewers", default: []
52
52
  option :pr_labels, type: :array, desc: "Pull Request labels", default: []
53
53
  option :pr_draft, type: :boolean, desc: "Whether to create draft Pull Request", default: false
54
+ option :pr_auto_merge, type: :boolean, desc: "Whether to auto-merge to Pull Request", default: false
54
55
  def github(*recipe_files)
55
56
  repository = option_or_env!(option_name: :github_repository, env_name: "GITHUB_REPOSITORY")
56
57
  api_endpoint = option_or_env!(option_name: :github_api_url, env_name: "GITHUB_API_URL")
@@ -58,6 +59,8 @@ module SashimiTanpopo
58
59
 
59
60
  summary_path = option_or_env(option_name: :github_step_summary, env_name: "GITHUB_STEP_SUMMARY")
60
61
 
62
+ raise ArgumentError, "`--pr-auto-merge` and `--pr-draft` cannot be used together." if options[:pr_auto_merge] && options[:pr_draft]
63
+
61
64
  Provider::GitHub.new(
62
65
  recipe_paths: recipe_files,
63
66
  target_dir: options[:target_dir],
@@ -77,6 +80,7 @@ module SashimiTanpopo
77
80
  pr_assignees: options[:pr_assignees],
78
81
  pr_reviewers: options[:pr_reviewers],
79
82
  pr_labels: options[:pr_labels],
83
+ pr_auto_merge: options[:pr_auto_merge],
80
84
  is_draft_pr: options[:pr_draft],
81
85
  summary_path: summary_path,
82
86
  only_changes_summary: options[:only_changes_summary],
@@ -10,6 +10,7 @@ module SashimiTanpopo
10
10
  # @param dry_run [Boolean]
11
11
  # @param is_colored [Boolean] Whether show color diff
12
12
  # @param is_update_local [Boolean] Whether update local file in `update_file`
13
+ # @param changed_files [Hash<String, { before_content: String, after_content: String, mode: String }>] key: file path, value: Hash
13
14
  #
14
15
  # @return [Hash<String, { before_content: String, after_content: String, mode: String }>] changed files (key: file path, value: Hash)
15
16
  #
@@ -21,7 +22,7 @@ module SashimiTanpopo
21
22
  # mode: "100644",
22
23
  # }
23
24
  # }
24
- def perform(recipe_path:, target_dir:, params:, dry_run:, is_colored:, is_update_local:)
25
+ def perform(recipe_path:, target_dir:, params:, dry_run:, is_colored:, is_update_local:, changed_files: {})
25
26
  evaluate(
26
27
  recipe_body: File.read(recipe_path),
27
28
  recipe_path: recipe_path,
@@ -30,6 +31,7 @@ module SashimiTanpopo
30
31
  dry_run: dry_run,
31
32
  is_colored: is_colored,
32
33
  is_update_local: is_update_local,
34
+ changed_files: changed_files,
33
35
  )
34
36
  end
35
37
 
@@ -42,6 +44,7 @@ module SashimiTanpopo
42
44
  # @param dry_run [Boolean]
43
45
  # @param is_colored [Boolean] Whether show color diff
44
46
  # @param is_update_local [Boolean] Whether update local file in `update_file`
47
+ # @param changed_files [Hash<String, { before_content: String, after_content: String, mode: String }>] key: file path, value: Hash
45
48
  #
46
49
  # @return [Hash<String, { before_content: String, after_content: String, mode: String }>] changed files (key: file path, value: Hash)
47
50
  #
@@ -53,8 +56,8 @@ module SashimiTanpopo
53
56
  # mode: "100644",
54
57
  # }
55
58
  # }
56
- def evaluate(recipe_body:, recipe_path:, target_dir:, params:, dry_run:, is_colored:, is_update_local:)
57
- context = EvalContext.new(params: params, dry_run: dry_run, is_colored: is_colored, target_dir: target_dir, is_update_local: is_update_local)
59
+ def evaluate(recipe_body:, recipe_path:, target_dir:, params:, dry_run:, is_colored:, is_update_local:, changed_files:)
60
+ context = EvalContext.new(params: params, dry_run: dry_run, is_colored: is_colored, target_dir: target_dir, is_update_local: is_update_local, changed_files: changed_files)
58
61
  InstanceEval.new(recipe_body: recipe_body, recipe_path: recipe_path, target_dir: target_dir, context: context).call
59
62
  context.changed_files
60
63
  end
@@ -65,12 +68,14 @@ module SashimiTanpopo
65
68
  # @param is_colored [Boolean] Whether show color diff
66
69
  # @param target_dir [String]
67
70
  # @param is_update_local [Boolean] Whether update local file in `update_file`
68
- def initialize(params:, dry_run:, is_colored:, target_dir:, is_update_local:)
71
+ # @param changed_files [Hash<String, { before_content: String, after_content: String, mode: String }>] key: file path, value: Hash
72
+ def initialize(params:, dry_run:, is_colored:, target_dir:, is_update_local:, changed_files:)
69
73
  @__params__ = params
70
74
  @__dry_run__ = dry_run
71
75
  @__target_dir__ = target_dir
72
76
  @__is_update_local__ = is_update_local
73
77
  @__is_colored__ = is_colored
78
+ @__changed_files__ = changed_files
74
79
  end
75
80
 
76
81
  # passed from `--params`
@@ -100,7 +105,7 @@ module SashimiTanpopo
100
105
  # }
101
106
  # }
102
107
  def changed_files
103
- @__changed_files__ ||= {}
108
+ @__changed_files__
104
109
  end
105
110
 
106
111
  # @return [Boolean] Whether dry run
@@ -113,25 +118,28 @@ module SashimiTanpopo
113
118
  @__dry_run__
114
119
  end
115
120
 
116
- # Update files if exists
121
+ # Update files
117
122
  #
118
123
  # @param pattern [String] Path to target file (relative path from `--target-dir`). This supports [`Dir.glob`](https://ruby-doc.org/current/Dir.html#method-c-glob) pattern. (e.g. `.github/workflows/*.yml`)
119
124
  # @param create [Boolean] Whether create new file if file doesn't exist
120
125
  #
121
126
  # @yieldparam content [String] Content of file. If `content` is changed in block, file will be changed.
122
127
  #
123
- # @example Update single file
128
+ # @example Update single file if exists
124
129
  # update_file "test.txt" do |content|
125
130
  # content.gsub!("name", params[:name])
126
131
  # end
127
132
  #
128
- # @example Update multiple files
133
+ # @example Update multiple files if exists
129
134
  # update_file ".github/workflows/*.yml" do |content|
130
135
  # content.gsub!(/ruby-version: "(.+)"/, %Q{ruby-version: "#{params[:ruby_version]}"})
131
136
  # end
132
137
  #
133
138
  # @example Create new file if file doesn't exist
134
139
  # update_file "new_file.txt", create: true do |content|
140
+ # # content
141
+ # # # => ""
142
+ #
135
143
  # content.replace("My name is " + params[:name])
136
144
  # end
137
145
  def update_file(pattern, create: false, &block)
@@ -42,6 +42,7 @@ module SashimiTanpopo
42
42
  dry_run: @dry_run,
43
43
  is_colored: @is_colored,
44
44
  is_update_local: @is_update_local,
45
+ changed_files: all_changed_files,
45
46
  )
46
47
 
47
48
  all_changed_files.merge!(changed_files)
@@ -26,6 +26,7 @@ module SashimiTanpopo
26
26
  # @param pr_assignees [Array<String>]
27
27
  # @param pr_reviewers [Array<String>]
28
28
  # @param pr_labels [Array<String>]
29
+ # @param pr_auto_merge [Boolean]
29
30
  # @param is_draft_pr [Boolean] Whether create draft Pull Request
30
31
  # @param summary_path [String,nil]
31
32
  # @param only_changes_summary [Boolean]
@@ -33,8 +34,8 @@ module SashimiTanpopo
33
34
  git_username:, git_email:, commit_message:,
34
35
  repository:, access_token:, api_endpoint: DEFAULT_API_ENDPOINT,
35
36
  pr_title:, pr_body:, pr_source_branch:, pr_target_branch:,
36
- pr_assignees: [], pr_reviewers: [], pr_labels: [], is_draft_pr:,
37
- summary_path:, only_changes_summary:)
37
+ pr_assignees: [], pr_reviewers: [], pr_labels: [], pr_auto_merge:,
38
+ is_draft_pr:, summary_path:, only_changes_summary:)
38
39
  super(
39
40
  recipe_paths: recipe_paths,
40
41
  target_dir: target_dir,
@@ -53,6 +54,7 @@ module SashimiTanpopo
53
54
  @pr_assignees = pr_assignees
54
55
  @pr_reviewers = pr_reviewers
55
56
  @pr_labels = pr_labels
57
+ @pr_auto_merge = pr_auto_merge
56
58
  @is_draft_pr = is_draft_pr
57
59
  @git_username = git_username
58
60
  @git_email = git_email
@@ -61,6 +63,13 @@ module SashimiTanpopo
61
63
  @only_changes_summary = only_changes_summary
62
64
 
63
65
  @client = Octokit::Client.new(api_endpoint: api_endpoint, access_token: access_token)
66
+ @graphql = Graphlient::Client.new(
67
+ "#{api_endpoint.delete_suffix("/")}/graphql",
68
+ headers: {
69
+ "Authorization" => "Bearer #{access_token}",
70
+ "Content-Type" => 'application/json'
71
+ },
72
+ )
64
73
  end
65
74
 
66
75
  # Apply recipe files
@@ -87,6 +96,8 @@ module SashimiTanpopo
87
96
  add_pr_assignees(pr[:number])
88
97
  add_pr_reviewers(pr[:number])
89
98
 
99
+ set_auto_merge(pr[:node_id]) if @pr_auto_merge
100
+
90
101
  pr[:html_url]
91
102
  end
92
103
 
@@ -256,6 +267,7 @@ module SashimiTanpopo
256
267
  {
257
268
  number: pr[:number],
258
269
  html_url: pr[:html_url],
270
+ node_id: pr[:node_id],
259
271
  }
260
272
  end
261
273
 
@@ -285,6 +297,26 @@ module SashimiTanpopo
285
297
 
286
298
  @client.request_pull_request_review(@repository, pr_number, reviewers: @pr_reviewers)
287
299
  end
300
+
301
+ # @param pr_node_id [String]
302
+ #
303
+ # @see https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge
304
+ def set_auto_merge(pr_node_id)
305
+ @graphql.query(<<~GRAPHQL, pullRequestId: pr_node_id)
306
+ mutation($pullRequestId: ID!) {
307
+ enablePullRequestAutoMerge(input: {
308
+ pullRequestId: $pullRequestId
309
+ }) {
310
+ pullRequest {
311
+ id
312
+ autoMergeRequest {
313
+ enabledAt
314
+ }
315
+ }
316
+ }
317
+ }
318
+ GRAPHQL
319
+ end
288
320
  end
289
321
  end
290
322
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SashimiTanpopo
4
- VERSION = "0.5.3"
4
+ VERSION = "0.6.0"
5
5
  end
@@ -5,6 +5,7 @@ require "diffy"
5
5
  require "octokit"
6
6
  require "gitlab"
7
7
  require "parallel"
8
+ require "graphlient"
8
9
 
9
10
  require_relative "sashimi_tanpopo/version"
10
11
  require_relative "sashimi_tanpopo/dsl"
@@ -1,28 +1,48 @@
1
1
  ---
2
2
  path: ".gem_rbs_collection"
3
3
  gems:
4
+ - name: activesupport
5
+ version: '7.0'
6
+ source:
7
+ type: git
8
+ name: ruby/gem_rbs_collection
9
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
10
+ remote: https://github.com/ruby/gem_rbs_collection.git
11
+ repo_dir: gems
4
12
  - name: addressable
5
13
  version: '2.8'
6
14
  source:
7
15
  type: git
8
16
  name: ruby/gem_rbs_collection
9
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
17
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
10
18
  remote: https://github.com/ruby/gem_rbs_collection.git
11
19
  repo_dir: gems
12
20
  - name: base64
13
- version: '0.1'
21
+ version: 0.3.0
22
+ source:
23
+ type: rubygems
24
+ - name: bigdecimal
25
+ version: '4.0'
14
26
  source:
15
27
  type: git
16
28
  name: ruby/gem_rbs_collection
17
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
29
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
18
30
  remote: https://github.com/ruby/gem_rbs_collection.git
19
31
  repo_dir: gems
20
- - name: bigdecimal
21
- version: '3.1'
32
+ - name: concurrent-ruby
33
+ version: '1.1'
34
+ source:
35
+ type: git
36
+ name: ruby/gem_rbs_collection
37
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
38
+ remote: https://github.com/ruby/gem_rbs_collection.git
39
+ repo_dir: gems
40
+ - name: connection_pool
41
+ version: '2.4'
22
42
  source:
23
43
  type: git
24
44
  name: ruby/gem_rbs_collection
25
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
45
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
26
46
  remote: https://github.com/ruby/gem_rbs_collection.git
27
47
  repo_dir: gems
28
48
  - name: csv
@@ -30,7 +50,7 @@ gems:
30
50
  source:
31
51
  type: git
32
52
  name: ruby/gem_rbs_collection
33
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
53
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
34
54
  remote: https://github.com/ruby/gem_rbs_collection.git
35
55
  repo_dir: gems
36
56
  - name: date
@@ -46,7 +66,7 @@ gems:
46
66
  source:
47
67
  type: git
48
68
  name: ruby/gem_rbs_collection
49
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
69
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
50
70
  remote: https://github.com/ruby/gem_rbs_collection.git
51
71
  repo_dir: gems
52
72
  - name: diffy
@@ -54,9 +74,13 @@ gems:
54
74
  source:
55
75
  type: git
56
76
  name: ruby/gem_rbs_collection
57
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
77
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
58
78
  remote: https://github.com/ruby/gem_rbs_collection.git
59
79
  repo_dir: gems
80
+ - name: digest
81
+ version: '0'
82
+ source:
83
+ type: stdlib
60
84
  - name: erb
61
85
  version: '0'
62
86
  source:
@@ -66,7 +90,7 @@ gems:
66
90
  source:
67
91
  type: git
68
92
  name: ruby/gem_rbs_collection
69
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
93
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
70
94
  remote: https://github.com/ruby/gem_rbs_collection.git
71
95
  repo_dir: gems
72
96
  - name: fileutils
@@ -82,7 +106,15 @@ gems:
82
106
  source:
83
107
  type: git
84
108
  name: ruby/gem_rbs_collection
85
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
109
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
110
+ remote: https://github.com/ruby/gem_rbs_collection.git
111
+ repo_dir: gems
112
+ - name: graphql
113
+ version: '1.12'
114
+ source:
115
+ type: git
116
+ name: ruby/gem_rbs_collection
117
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
86
118
  remote: https://github.com/ruby/gem_rbs_collection.git
87
119
  repo_dir: gems
88
120
  - name: hashdiff
@@ -90,7 +122,7 @@ gems:
90
122
  source:
91
123
  type: git
92
124
  name: ruby/gem_rbs_collection
93
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
125
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
94
126
  remote: https://github.com/ruby/gem_rbs_collection.git
95
127
  repo_dir: gems
96
128
  - name: httparty
@@ -98,7 +130,15 @@ gems:
98
130
  source:
99
131
  type: git
100
132
  name: ruby/gem_rbs_collection
101
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
133
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
134
+ remote: https://github.com/ruby/gem_rbs_collection.git
135
+ repo_dir: gems
136
+ - name: i18n
137
+ version: '1.10'
138
+ source:
139
+ type: git
140
+ name: ruby/gem_rbs_collection
141
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
102
142
  remote: https://github.com/ruby/gem_rbs_collection.git
103
143
  repo_dir: gems
104
144
  - name: io-console
@@ -118,13 +158,25 @@ gems:
118
158
  source:
119
159
  type: git
120
160
  name: ruby/gem_rbs_collection
121
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
161
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
162
+ remote: https://github.com/ruby/gem_rbs_collection.git
163
+ repo_dir: gems
164
+ - name: minitest
165
+ version: '5.25'
166
+ source:
167
+ type: git
168
+ name: ruby/gem_rbs_collection
169
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
122
170
  remote: https://github.com/ruby/gem_rbs_collection.git
123
171
  repo_dir: gems
124
172
  - name: monitor
125
173
  version: '0'
126
174
  source:
127
175
  type: stdlib
176
+ - name: multi_xml
177
+ version: 0.8.0
178
+ source:
179
+ type: rubygems
128
180
  - name: net-http
129
181
  version: '0'
130
182
  source:
@@ -138,15 +190,19 @@ gems:
138
190
  source:
139
191
  type: git
140
192
  name: ruby/gem_rbs_collection
141
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
193
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
142
194
  remote: https://github.com/ruby/gem_rbs_collection.git
143
195
  repo_dir: gems
196
+ - name: openssl
197
+ version: '0'
198
+ source:
199
+ type: stdlib
144
200
  - name: parallel
145
201
  version: '1.20'
146
202
  source:
147
203
  type: git
148
204
  name: ruby/gem_rbs_collection
149
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
205
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
150
206
  remote: https://github.com/ruby/gem_rbs_collection.git
151
207
  repo_dir: gems
152
208
  - name: pp
@@ -157,6 +213,10 @@ gems:
157
213
  version: '0'
158
214
  source:
159
215
  type: stdlib
216
+ - name: prism
217
+ version: 1.7.0
218
+ source:
219
+ type: rubygems
160
220
  - name: pstore
161
221
  version: '0'
162
222
  source:
@@ -170,13 +230,25 @@ gems:
170
230
  source:
171
231
  type: git
172
232
  name: ruby/gem_rbs_collection
173
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
233
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
174
234
  remote: https://github.com/ruby/gem_rbs_collection.git
175
235
  repo_dir: gems
176
236
  - name: rdoc
177
237
  version: '0'
178
238
  source:
179
239
  type: stdlib
240
+ - name: securerandom
241
+ version: '0'
242
+ source:
243
+ type: stdlib
244
+ - name: singleton
245
+ version: '0'
246
+ source:
247
+ type: stdlib
248
+ - name: socket
249
+ version: '0'
250
+ source:
251
+ type: stdlib
180
252
  - name: stringio
181
253
  version: '0'
182
254
  source:
@@ -186,9 +258,13 @@ gems:
186
258
  source:
187
259
  type: git
188
260
  name: ruby/gem_rbs_collection
189
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
261
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
190
262
  remote: https://github.com/ruby/gem_rbs_collection.git
191
263
  repo_dir: gems
264
+ - name: time
265
+ version: '0'
266
+ source:
267
+ type: stdlib
192
268
  - name: timeout
193
269
  version: '0'
194
270
  source:
@@ -197,6 +273,14 @@ gems:
197
273
  version: '0'
198
274
  source:
199
275
  type: stdlib
276
+ - name: tzinfo
277
+ version: '2.0'
278
+ source:
279
+ type: git
280
+ name: ruby/gem_rbs_collection
281
+ revision: 4562d89069beae0a6aaaf8553a6b561a4f9094b8
282
+ remote: https://github.com/ruby/gem_rbs_collection.git
283
+ repo_dir: gems
200
284
  - name: uri
201
285
  version: '0'
202
286
  source:
@@ -206,7 +290,7 @@ gems:
206
290
  source:
207
291
  type: git
208
292
  name: ruby/gem_rbs_collection
209
- revision: f1d2dae32fe8d46683fbc79bbd0f1ca391d5e11a
293
+ revision: f2826d40140e8d87f43a44375bb277ba7b7b2e19
210
294
  remote: https://github.com/ruby/gem_rbs_collection.git
211
295
  repo_dir: gems
212
296
  gemfile_lock_path: Gemfile.lock
@@ -7,6 +7,7 @@ module SashimiTanpopo
7
7
  dry_run: bool,
8
8
  is_colored: bool,
9
9
  is_update_local: bool,
10
+ changed_files: changed_files,
10
11
  ) -> changed_files
11
12
 
12
13
  def evaluate: (
@@ -17,6 +18,7 @@ module SashimiTanpopo
17
18
  dry_run: bool,
18
19
  is_colored: bool,
19
20
  is_update_local: bool,
21
+ changed_files: changed_files,
20
22
  ) -> changed_files
21
23
 
22
24
  class EvalContext
@@ -33,6 +35,7 @@ module SashimiTanpopo
33
35
  is_colored: bool,
34
36
  target_dir: String,
35
37
  is_update_local: bool,
38
+ changed_files: changed_files,
36
39
  ) -> void
37
40
 
38
41
  def params: () -> Hash[Symbol, String]
@@ -15,12 +15,15 @@ module SashimiTanpopo
15
15
  @pr_assignees: Array[String]
16
16
  @pr_reviewers: Array[String]
17
17
  @pr_labels: Array[String]
18
- @client: Octokit::Client
18
+ @pr_auto_merge: bool
19
19
  @is_draft_pr: bool
20
20
  @api_endpoint: String
21
21
  @summary_path: String
22
22
  @only_changes_summary: bool
23
23
 
24
+ @client: Octokit::Client
25
+ @graphql: Graphlient::Client
26
+
24
27
  def initialize: (
25
28
  recipe_paths: Array[String],
26
29
  target_dir: String?,
@@ -40,6 +43,7 @@ module SashimiTanpopo
40
43
  ?pr_assignees: Array[String],
41
44
  ?pr_reviewers: Array[String],
42
45
  ?pr_labels: Array[String],
46
+ pr_auto_merge: bool,
43
47
  is_draft_pr: bool,
44
48
  summary_path: String?,
45
49
  only_changes_summary: bool,
@@ -71,13 +75,15 @@ module SashimiTanpopo
71
75
 
72
76
  def create_tree_meta: (path: String, body: String, mode: String) -> { path: String, mode: String, type: String, sha: String }
73
77
 
74
- def create_pull_request: () -> { number: Integer, html_url: String }
78
+ def create_pull_request: () -> { number: Integer, html_url: String, node_id: String }
75
79
 
76
80
  def add_pr_labels: (Integer pr_number) -> void
77
81
 
78
82
  def add_pr_assignees: (Integer pr_number) -> void
79
83
 
80
84
  def add_pr_reviewers: (Integer pr_number) -> void
85
+
86
+ def set_auto_merge: (String pr_node_id) -> void
81
87
  end
82
88
  end
83
89
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sashimi_tanpopo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
@@ -69,6 +69,26 @@ dependencies:
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '7.0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: graphlient
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0.8'
79
+ - - "<"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.0'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0.8'
89
+ - - "<"
90
+ - !ruby/object:Gem::Version
91
+ version: '1.0'
72
92
  - !ruby/object:Gem::Dependency
73
93
  name: octokit
74
94
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
324
  - !ruby/object:Gem::Version
305
325
  version: '0'
306
326
  requirements: []
307
- rubygems_version: 3.6.9
327
+ rubygems_version: 4.0.3
308
328
  specification_version: 4
309
329
  summary: Change files and create patches
310
330
  test_files: []