Skip to content

Commit c6f2a3d

Browse files
committed
allow add repositories for self hosted Gitlab
1 parent 0503c63 commit c6f2a3d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
### Modified
9+
- allow add repositories for self hosted Gitlab
10+
711
## [2.0.1] - 2024-11-27
812
### Added
913
- wizard for creating first company/repository/access_token

app/commands/add_repository_command.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class AddRepositoryCommand < BaseCommand
1717
end
1818

1919
rule(:provider, :link) do
20-
unless values[:link].starts_with?(Repository::LINK_FORMAT_BY_PROVIDER[values[:provider]])
20+
if values[:provider] == Providerable::GITHUB &&
21+
!values[:link].starts_with?(Repository::LINK_FORMAT_BY_PROVIDER[values[:provider]])
2122
key(:link).failure(:invalid_host)
2223
end
2324
end

app/views/controllers/web/welcome/access_tokens.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<p class="mb-4">For fetching pull requests data from Github your company or repository must have attached Personal Access Token (PAT).</p>
55
<p class="mb-2">For creating this PAT you need:</p>
66
<ul class="ul mb-0">
7-
<li>visit <a href="https://github.com/settings/personal-access-tokens/new" target="_blank" rel="noopener noreferrer" class="simple-link">Github token generating page</a>, or <a href="https://gitlab.com/-/profile/personal_access_tokens" target="_blank" rel="noopener noreferrer" class="simple-link">Gitlab token generating page</a></li>
7+
<li>visit <a href="https://github.com/settings/personal-access-tokens/new" target="_blank" rel="noopener noreferrer" class="simple-link">Github token generating page</a>, or <a href="https://gitlab.com/-/user_settings/personal_access_tokens" target="_blank" rel="noopener noreferrer" class="simple-link">Gitlab token generating page</a></li>
88
<li>set token name and expiration time,</li>
99
<li>in Repository access area - select for which repositories you want to create token,</li>
1010
</ul>

0 commit comments

Comments
 (0)