Hi,
I use Gnosis with my self-hosted Gitea instance. It does detect the pull requests, so far so good.
However if I want to synchronize the PRs from the plugin's configuration UI, it will only work for the Github link that is hardcoded in the source code (correct me if I'm wrong please) of the plugin. As a result sync will fail. See the redmine error log below for reference:
Show/hide logs
I, [2025-07-16T12:13:05.342732 #2255155] INFO -- : [d6********************************16] Filter chain halted as :authorize rendered or redirected
I, [2025-07-16T12:13:05.342985 #2255155] INFO -- : [d6********************************16] Completed 302 Found in 14ms (ActiveRecord: 3.8ms (6 queries, 0 cached) | GC: 0.2ms)
I, [2025-07-16T12:13:13.898599 #2255155] INFO -- : [d9********************************27] Started GET "/sync_pull_requests" for 21*********11 at 2025-07-16 12:13:13 +0*00
I, [2025-07-16T12:13:13.900070 #2255155] INFO -- : [d9********************************27] Processing by SyncController#sync_pull_requests as */*
I, [2025-07-16T12:13:13.913838 #2255155] INFO -- : [d9********************************27] Current user: *****
I, [2025-07-16T12:13:13.915315 #2255155] INFO -- : [d9********************************27] [ActiveJob] [SyncJob] [82********************************c0] Performing SyncJob (Job ID: 82********************************c0) from Async(default)
I, [2025-07-16T12:13:13.915545 #2255155] INFO -- : [d9********************************27] [ActiveJob] [SyncJob] [82********************************c0] [PullRequestSyncJob] --- Starting with pull request sync
E, [2025-07-16T12:13:14.341146 #2255155] ERROR -- : [d9********************************27] [ActiveJob] [SyncJob] [82********************************c0] Error performing SyncJob (Job ID: 82********************************c0) from Async(default) in 425.66ms: Octokit**Unauthorized (GET https://api.github.com/orgs/*****/repos?per_page=100&type=private: 401 - Bad credentials // See: https://docs.github.com/rest):
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/response/raise_error.rb:14:in `on_complete'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/middleware.rb:57:in `block in call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/response.rb:42:in `on_complete'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/middleware.rb:56:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/rack_builder.rb:153:in `build_response'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/connection.rb:452:in `run_request'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/faraday-2.13.2/lib/faraday/connection.rb:200:in `get'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/sawyer-0.9.2/lib/sawyer/agent.rb:99:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/connection.rb:158:in `request'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/connection.rb:84:in `paginate'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/octokit-10.0.0/lib/octokit/client/organizations.rb:142:in `organization_repositories'
/var/www/redmine/plugins/gnosis/app/services/pull_request_sync_service.rb:18:in `fetch_repositories'
/var/www/redmine/plugins/gnosis/app/services/pull_request_sync_service.rb:5:in `call'
/var/www/redmine/plugins/gnosis/app/job/sync_job.rb:6:in `perform'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/execution.rb:68:in `block in _perform_job'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/i18n-1.14.7/lib/i18n.rb:348:in `with_locale'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/translation.rb:9:in `block (2 levels) in '
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:130:in `instance_exec'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/core_ext/time/zones.rb:65:in `use_zone'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/timezones.rb:9:in `block (2 levels) in '
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:130:in `instance_exec'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:141:in `run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/execution.rb:67:in `_perform_job'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/instrumentation.rb:32:in `_perform_job'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/execution.rb:51:in `perform_now'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/instrumentation.rb:26:in `block in perform_now'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activerecord-7.2.2.1/lib/active_record/railties/job_runtime.rb:13:in `block in instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/instrumentation.rb:40:in `block in instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications.rb:210:in `block in instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications.rb:210:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/instrumentation.rb:39:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activerecord-7.2.2.1/lib/active_record/railties/job_runtime.rb:11:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/instrumentation.rb:26:in `perform_now'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/logging.rb:32:in `block in perform_now'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/tagged_logging.rb:138:in `block in tagged'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/tagged_logging.rb:38:in `tagged'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/tagged_logging.rb:138:in `tagged'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:241:in `method_missing'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/logging.rb:39:in `tag_logger'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/logging.rb:32:in `perform_now'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activejob-7.2.2.1/lib/active_job/execution.rb:23:in `perform_now'
/var/www/redmine/plugins/gnosis/app/controllers/sync_controller.rb:7:in `sync_pull_requests'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/basic_implicit_render.rb:8:in `send_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/abstract_controller/base.rb:226:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/rendering.rb:193:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/abstract_controller/callbacks.rb:261:in `block in process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/var/www/redmine/lib/redmine/sudo_mode.rb:78:in `sudo_mode'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:141:in `run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/abstract_controller/callbacks.rb:260:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/rescue.rb:27:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/instrumentation.rb:77:in `block in process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications.rb:210:in `block in instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/notifications.rb:210:in `instrument'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/instrumentation.rb:76:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activerecord-7.2.2.1/lib/active_record/railties/controller_runtime.rb:39:in `process_action'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/abstract_controller/base.rb:163:in `process'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionview-7.2.2.1/lib/action_view/rendering.rb:40:in `process'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_controller/metal.rb:335:in `dispatch'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/routing/route_set.rb:50:in `serve'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/journey/router.rb:53:in `block in serve'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/journey/router.rb:133:in `block in find_routes'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/journey/router.rb:126:in `each'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/journey/router.rb:126:in `find_routes'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/journey/router.rb:34:in `serve'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/routing/route_set.rb:896:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/tempfile_reaper.rb:20:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/etag.rb:29:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/conditional_get.rb:31:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/head.rb:15:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/http/permissions_policy.rb:38:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/http/content_security_policy.rb:38:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-session-2.1.1/lib/rack/session/abstract/id.rb:274:in `context'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-session-2.1.1/lib/rack/session/abstract/id.rb:268:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/cookies.rb:704:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:101:in `run_callbacks'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/callbacks.rb:30:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/railties-7.2.2.1/lib/rails/rack/logger.rb:41:in `call_app'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/railties-7.2.2.1/lib/rails/rack/logger.rb:29:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/remote_ip.rb:96:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/request_id.rb:33:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/method_override.rb:28:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/runtime.rb:24:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/executor.rb:16:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/actionpack-7.2.2.1/lib/action_dispatch/middleware/static.rb:27:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/sendfile.rb:114:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rack-3.1.16/lib/rack/content_length.rb:20:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/railties-7.2.2.1/lib/rails/engine.rb:535:in `call'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/rackup-2.2.1/lib/rackup/handler/webrick.rb:111:in `service'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/webrick-1.9.1/lib/webrick/httpserver.rb:140:in `service'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/webrick-1.9.1/lib/webrick/httpserver.rb:96:in `run'
/var/www/redmine/vendor/bundle/ruby/3.1.0/gems/webrick-1.9.1/lib/webrick/server.rb:310:in `block in start_thread'
E, [2025-07-16T12:13:14.341724 #2255155] ERROR -- : [d9********************************27] GET https://api.github.com/orgs/*****/repos?per_page=100&type=private: 401 - Bad credentials // See: https://docs.github.com/rest
Also for reference, here is the Giİtea API docs: https://docs.gitea.com/development/api-usage.
So, can this be made configurable instead of embedding platform support directly into the source code of plugin?
Regards
Hi,
I use Gnosis with my self-hosted Gitea instance. It does detect the pull requests, so far so good.
However if I want to synchronize the PRs from the plugin's configuration UI, it will only work for the Github link that is hardcoded in the source code (correct me if I'm wrong please) of the plugin. As a result sync will fail. See the redmine error log below for reference:
Show/hide logs
Also for reference, here is the Giİtea API docs: https://docs.gitea.com/development/api-usage.
So, can this be made configurable instead of embedding platform support directly into the source code of plugin?
Regards