Merge pull request #448 from CanineHQ/chriszhu__gh_enterprise

support for github / gitlab enterprise
This commit is contained in:
Chris Zhu
2025-12-12 05:06:44 +09:00
committed by GitHub
12 changed files with 122 additions and 46 deletions

View File

@@ -1,6 +1,10 @@
class Integrations::Github::RepositoriesController < ApplicationController
def index
client = Octokit::Client.new(access_token: current_account.github_provider.access_token)
provider = current_account.github_provider
client = Git::Github::Client.build_client(
access_token: provider.access_token,
api_base_url: provider.api_base_url
)
if params[:q].present?
client.auto_paginate = true
@repositories = client.repos(current_account.github_username)