Skip to content

Commit 9f1a057

Browse files
authored
Merge branch 'main' into v8
2 parents 8532300 + c0ce2e5 commit 9f1a057

File tree

110 files changed

+15868
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+15868
-255
lines changed

.github/workflows/add_to_octokit_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
1414
steps:
15-
- uses: actions/add-to-project@v0.5.0
15+
- uses: actions/add-to-project@v1.0.2
1616
with:
1717
project-url: https://github.com/orgs/octokit/projects/10
1818
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
47+
uses: github/codeql-action/init@v3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
61+
uses: github/codeql-action/autobuild@v3
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,4 +71,4 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
74+
uses: github/codeql-action/analyze@v3

.github/workflows/immediate-response.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ on:
66
issues:
77
types:
88
- opened
9-
pull_request:
9+
pull_request_target:
1010
types:
1111
- opened
1212
jobs:
1313
respond-to-issue:
14-
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }}
14+
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }}
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Determine issue or PR number
1818
id: extract
1919
run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
2020

2121
- name: Respond to issue or PR
22-
uses: peter-evans/create-or-update-comment@v3
22+
uses: peter-evans/create-or-update-comment@v4
2323
with:
2424
issue-number: ${{ steps.extract.outputs.NUMBER }}
2525
body: >
2626
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday!
2727
We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input.
28-
Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with `Status: Up for grabs`.
28+
Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with `Status: Up for grabs`.
2929
You & others like you are the reason all of this works! So thank you & happy coding! 🚀

.github/workflows/octokit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- "3.0"
2222
- "3.1"
2323
- "3.2"
24+
- "3.3"
2425
- head
2526
faraday:
2627
- ~> 1.0
@@ -30,7 +31,7 @@ jobs:
3031
steps:
3132
- uses: actions/checkout@v4
3233
- name: Cache Ruby dependencies
33-
uses: actions/cache@v3
34+
uses: actions/cache@v4
3435
with:
3536
path: ./.bundle/gems
3637
key: >-

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
stale:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/stale@v8
12+
- uses: actions/stale@v9
1313
with:
1414
stale-issue-message: >
1515
👋 Hey Friends, this issue has been automatically marked as `stale` because it has no recent activity.

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ group :test do
2020
gem 'rexml', '>= 3.2.4'
2121
end
2222
gem 'faraday-http-cache', '~> 2.5', '>= 2.5.1'
23+
gem 'base64'
2324
gem 'json', '>= 2.3.0'
2425
gem 'jwt', '~> 2.2', '>= 2.2.1'
2526
gem 'mime-types', '~> 3.3', '>= 3.3.1'
@@ -48,7 +49,7 @@ group :test, :development do
4849
gem 'bundler', '>= 1', '< 3'
4950
gem 'pry-byebug'
5051
gem 'redcarpet'
51-
gem 'rubocop', '1.57.1'
52+
gem 'rubocop', '1.66.1'
5253
end
5354

5455
gemspec

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Install via Rubygems
8181

8282
... or add to your Gemfile
8383

84-
gem "octokit", "~> 5.0"
84+
gem "octokit"
8585

8686
Access the library in Ruby:
8787

@@ -709,6 +709,9 @@ Octokit:
709709
| `OCTOKIT_TEST_GITHUB_ENTERPRISE_MANAGEMENT_CONSOLE_PASSWORD` | GitHub Enterprise management console password. |
710710
| `OCTOKIT_TEST_GITHUB_ENTERPRISE_ENDPOINT` | GitHub Enterprise hostname. |
711711
| `OCTOKIT_TEST_GITHUB_ENTERPRISE_MANAGEMENT_CONSOLE_ENDPOINT` | GitHub Enterprise Management Console endpoint. |
712+
| `OCTOKIT_TEST_GITHUB_MANAGE_GHES_ENDPOINT` | GitHub Enterprise Server GHES Manage Endpoint. |
713+
| `OCTOKIT_TEST_GITHUB_MANAGE_GHES_USERNAME` | GitHub Enterprise Server GHES Manage Username. |
714+
| `OCTOKIT_TEST_GITHUB_MANAGE_GHES_PASSWORD` | GitHub Enterprise Server GHES Manage Password. |
712715
| `OCTOKIT_TEST_GITHUB_INTEGRATION` | [GitHub Integration](https://developer.github.com/early-access/integrations/) owned by your test organization. |
713716
| `OCTOKIT_TEST_GITHUB_INTEGRATION_INSTALLATION` | Installation of the GitHub Integration specified above. |
714717
| `OCTOKIT_TEST_INTEGRATION_PEM_KEY` | File path to the private key generated from your integration. |
@@ -738,6 +741,7 @@ implementations:
738741
* Ruby 3.0
739742
* Ruby 3.1
740743
* Ruby 3.2
744+
* Ruby 3.3
741745

742746
If something doesn't work on one of these Ruby versions, it's a bug.
743747

lib/octokit.rb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
require 'octokit/client'
55
require 'octokit/enterprise_admin_client'
66
require 'octokit/enterprise_management_console_client'
7+
require 'octokit/manage_ghes_client'
78

89
# Ruby toolkit for the GitHub API
910
module Octokit
@@ -41,12 +42,24 @@ def enterprise_management_console_client
4142
@enterprise_management_console_client = Octokit::EnterpriseManagementConsoleClient.new(options)
4243
end
4344

45+
# ManageGHESClient client based on configured options {Configurable}
46+
#
47+
# @return [Octokit::ManageGHESClient] API wrapper
48+
def manage_ghes_client
49+
if defined?(@manage_ghes_client) && @manage_ghes_client.same_options?(options)
50+
return @manage_ghes_client
51+
end
52+
53+
@manage_ghes_client = Octokit::ManageGHESClient.new(options)
54+
end
55+
4456
private
4557

4658
def respond_to_missing?(method_name, include_private = false)
4759
client.respond_to?(method_name, include_private) ||
4860
enterprise_admin_client.respond_to?(method_name, include_private) ||
49-
enterprise_management_console_client.respond_to?(method_name, include_private)
61+
enterprise_management_console_client.respond_to?(method_name, include_private) ||
62+
manage_ghes_client.respond_to?(method_name, include_private)
5063
end
5164

5265
def method_missing(method_name, *args, &block)
@@ -56,6 +69,8 @@ def method_missing(method_name, *args, &block)
5669
return enterprise_admin_client.send(method_name, *args, &block)
5770
elsif enterprise_management_console_client.respond_to?(method_name)
5871
return enterprise_management_console_client.send(method_name, *args, &block)
72+
elsif manage_ghes_client.respond_to?(method_name)
73+
return manage_ghes_client.send(method_name, *args, &block)
5974
end
6075

6176
super

lib/octokit/arguments.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Arguments < Array
88

99
def initialize(args)
1010
@options = args.last.is_a?(::Hash) ? args.pop : {}
11-
super(args)
11+
super
1212
end
1313
end
1414
end

lib/octokit/client.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
require 'octokit/client/organizations'
5151
require 'octokit/client/pages'
5252
require 'octokit/client/projects'
53-
require 'octokit/client/pub_sub_hubbub'
5453
require 'octokit/client/pull_requests'
5554
require 'octokit/client/rate_limit'
5655
require 'octokit/client/reactions'
@@ -118,7 +117,6 @@ class Client
118117
include Octokit::Client::Organizations
119118
include Octokit::Client::Pages
120119
include Octokit::Client::Projects
121-
include Octokit::Client::PubSubHubbub
122120
include Octokit::Client::PullRequests
123121
include Octokit::Client::RateLimit
124122
include Octokit::Client::Reactions

0 commit comments

Comments
 (0)