octokit 5.2.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 971671d7bf27fc19d9cd0072a73bb39d2ed82dfcfff2c0bf1d897d889bb34d81
4
- data.tar.gz: 12bf586942ad3004b5aaf109aa0cd394429742160f486b03ead76523ba6ddd0f
3
+ metadata.gz: bb3c4ab224890bb19194fb2c7af88c0e89be709e12b9a7df13df4d3aa7cac1dc
4
+ data.tar.gz: 79a40c2fea62d7898e7906a3119bf5049c51baeb128dfa88722301682b691204
5
5
  SHA512:
6
- metadata.gz: 766b52be3c9bfb04e5c5d049617e211e1f2cdf66611c1634475688f87fa94ab2252a299147ef917a3eb634ced46558042fcf06364098cb5d60664d3481519cd3
7
- data.tar.gz: f8f75a3e85310b927801f98290ac7cc7643b918715026e621e2bc5de6887eefda47c28fabb8ab14040df234011ced8b6488216a3ca8a64614eb528d488ebfc9f
6
+ metadata.gz: 6b6a080f40b9c52cb1450d13f5d64d0dbc8f8e27e699b585d0e9e1a3e29eb1a0b19eec29ca6ef25726b1c113f0c088a530762eabc297eb2a47ca77dedc71444c
7
+ data.tar.gz: ea44cdd3350cf3206dee44ca90f3fa3f3776d1be078fdaa77b64c99b3e3d1e9d7d7d6800f95cd4cfa076a0e171f8e7e7d689066ff551d2d8d5a63cb1efaff56c
data/README.md CHANGED
@@ -79,7 +79,7 @@ Install via Rubygems
79
79
 
80
80
  ... or add to your Gemfile
81
81
 
82
- gem "octokit", "~> 4.0"
82
+ gem "octokit", "~> 5.0"
83
83
 
84
84
  Access the library in Ruby:
85
85
 
@@ -335,6 +335,27 @@ module Octokit
335
335
  get "#{Organization.path(org)}/teams/#{team_slug}", options
336
336
  end
337
337
 
338
+ # Check team permissions for a repository
339
+ #
340
+ # Requires authenticated organization member.
341
+ #
342
+ # @param org [String, Integer] Organization GitHub login or id.
343
+ # @param team_slug_or_id [String, Integer] Team slug or Team ID.
344
+ # @param owner [String] Owner name for the repository.
345
+ # @param repo [String] Name of the repo to check permissions against.
346
+ # @return [String, Sawyer::Resource] Depending on options it may be an empty string or a resource.
347
+ # @example
348
+ # # Check whether the team has any permissions with the repository
349
+ # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world")
350
+ #
351
+ # @example
352
+ # # Get the full repository object including the permissions level and role for the team
353
+ # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world", :accept => 'application/vnd.github.v3.repository+json')
354
+ # @see https://docs.github.com/en/rest/teams/teams#check-team-permissions-for-a-repository
355
+ def team_permissions_for_repo(org, team_slug_or_id, owner, repo, options = {})
356
+ get "#{Organization.path(org)}/teams/#{team_slug_or_id}/repos/#{owner}/#{repo}", options
357
+ end
358
+
338
359
  # List child teams
339
360
  #
340
361
  # Requires authenticated organization member.
@@ -276,6 +276,17 @@ module Octokit
276
276
  end
277
277
  alias pull_files pull_request_files
278
278
 
279
+ # Update a pull request branch
280
+ #
281
+ # @see https://developer.github.com/v3/pulls/#update-a-pull-request-branch
282
+ # @param repo [Integer, String, Hash, Repository] A GitHub repository
283
+ # @param number [Integer] Number of pull request
284
+ # @param options [Hash] Optional parameters (e.g. expected_head_sha)
285
+ # @return [Boolean] True if the pull request branch has been updated
286
+ def update_pull_request_branch(repo, number, options = {})
287
+ boolean_from_response(:put, "#{Repository.path repo}/pulls/#{number}/update-branch", options)
288
+ end
289
+
279
290
  # Merge a pull request
280
291
  #
281
292
  # @see https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
@@ -7,7 +7,7 @@ module Octokit
7
7
 
8
8
  # Current minor release.
9
9
  # @return [Integer]
10
- MINOR = 2
10
+ MINOR = 4
11
11
 
12
12
  # Current patch level.
13
13
  # @return [Integer]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wynn Netherland
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-08-01 00:00:00.000000000 Z
13
+ date: 2022-08-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: 1.3.5
184
184
  requirements: []
185
- rubygems_version: 3.1.2
185
+ rubygems_version: 3.3.7
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Ruby toolkit for working with the GitHub API