2021-03-11 19:13:27 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-02-02 18:00:53 +05:30
|
|
|
# Alias import callbacks under the /users/auth endpoint so that
|
|
|
|
# the OAuth2 callback URL can be restricted under http://example.com/users/auth
|
|
|
|
# instead of http://example.com.
|
2019-02-15 15:39:39 +05:30
|
|
|
Devise.omniauth_providers.map(&:downcase).each do |provider|
|
2019-02-02 18:00:53 +05:30
|
|
|
next if provider == 'ldapmain'
|
|
|
|
|
|
|
|
get "/users/auth/-/import/#{provider}/callback", to: "import/#{provider}#callback", as: "users_import_#{provider}_callback"
|
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
namespace :import do
|
2022-06-21 17:19:12 +05:30
|
|
|
resources :history, only: [:index], controller: :history
|
|
|
|
|
2021-11-18 22:05:49 +05:30
|
|
|
namespace :url do
|
|
|
|
post :validate
|
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :github, only: [:create, :new], controller: :github do
|
|
|
|
post :personal_access_token
|
|
|
|
get :status
|
|
|
|
get :callback
|
2019-07-07 11:18:12 +05:30
|
|
|
get :realtime_changes
|
2022-11-25 23:54:43 +05:30
|
|
|
post :cancel
|
2023-04-23 21:23:45 +05:30
|
|
|
post :cancel_all
|
2023-05-27 22:25:52 +05:30
|
|
|
get :counts
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
resource :gitea, only: [:create, :new], controller: :gitea do
|
|
|
|
post :personal_access_token
|
|
|
|
get :status
|
2019-07-07 11:18:12 +05:30
|
|
|
get :realtime_changes
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :gitlab, only: [:create], controller: :gitlab do
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-23 00:09:42 +05:30
|
|
|
get :realtime_changes
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
resource :bitbucket, only: [:create], controller: :bitbucket do
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-23 00:09:42 +05:30
|
|
|
get :realtime_changes
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
resource :bitbucket_server, only: [:create, :new], controller: :bitbucket_server do
|
|
|
|
post :configure
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-23 00:09:42 +05:30
|
|
|
get :realtime_changes
|
2018-11-18 11:00:15 +05:30
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :fogbugz, only: [:create, :new], controller: :fogbugz do
|
|
|
|
get :status
|
|
|
|
post :callback
|
2020-06-23 00:09:42 +05:30
|
|
|
get :realtime_changes
|
2016-11-03 12:29:30 +05:30
|
|
|
|
|
|
|
get :new_user_map, path: :user_map
|
|
|
|
post :create_user_map, path: :user_map
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :gitlab_project, only: [:create, :new] do
|
|
|
|
post :create
|
2020-04-08 14:13:33 +05:30
|
|
|
post :authorize
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
2018-11-18 11:00:15 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
resource :gitlab_group, only: [:create] do
|
|
|
|
post :authorize
|
|
|
|
end
|
|
|
|
|
2022-11-25 23:54:43 +05:30
|
|
|
resource :github_group, only: [] do
|
|
|
|
get :status
|
|
|
|
end
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
resource :bulk_imports, only: [:create] do
|
2021-01-03 14:25:43 +05:30
|
|
|
post :configure
|
|
|
|
get :status
|
2021-03-08 18:12:59 +05:30
|
|
|
get :realtime_changes
|
2021-11-18 22:05:49 +05:30
|
|
|
get :history
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
resource :manifest, only: [:create, :new], controller: :manifest do
|
|
|
|
get :status
|
2020-10-24 23:57:45 +05:30
|
|
|
get :realtime_changes
|
2018-11-18 11:00:15 +05:30
|
|
|
post :upload
|
|
|
|
end
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
resource :phabricator, only: [:create, :new], controller: :phabricator
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|