diff --git a/Apps.GitLab/Apps.GitLab.csproj b/Apps.GitLab/Apps.GitLab.csproj index da56bb7..912a6a7 100644 --- a/Apps.GitLab/Apps.GitLab.csproj +++ b/Apps.GitLab/Apps.GitLab.csproj @@ -6,7 +6,7 @@ enable GitLab Software development & version control - 1.0.12 + 1.0.13 Apps.GitLab diff --git a/GitLab.sln b/GitLab.sln index 354ccb1..3ec11f7 100644 --- a/GitLab.sln +++ b/GitLab.sln @@ -1,12 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 -VisualStudioVersion = 18.4.11506.43 insiders +VisualStudioVersion = 18.4.11506.43 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apps.GitLab", "Apps.GitLab\Apps.GitLab.csproj", "{08DA241F-5E71-4FDD-8306-9C9E2A411466}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.GitLab", "Tests.GitLab\Tests.GitLab.csproj", "{320EAF68-A92B-8042-6F32-8A593D57993E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{205305AF-D0F1-4354-A67D-908B39D5D1DE}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/README.md b/README.md index 4e39877..222fd8f 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,50 @@ Before you can connect you need to make sure that: ## Connecting +GitLab supports the following connection types in Blackbird: + +- **OAuth**: use this option for GitLab-hosted accounts. +- **OAuth Self-managed**: use this option for self-managed GitLab instances hosted on a custom domain. +- **Personal Access Token**: use this option when you want to connect with a personal token instead of OAuth. + 1. Navigate to apps and search for GitLab. If you cannot find GitLab then click _Add App_ in the top right corner, select GitLab and add the app to your Blackbird environment. 2. Click _Add Connection_. 3. Name your connection for future reference e.g. 'My GitLab connection'. -4. Click _Authorize connection_. -5. Follow the instructions that GitLab gives you, authorizing Blackbird.io to act on your behalf. +4. Choose the connection type that matches your GitLab environment. +5. Complete the authentication flow for the selected connection type. 6. When you return to Blackbird, confirm that the connection has appeared and the status is _Connected_. ![1705402013379](image/README/1705402013379.png) +### Connecting with OAuth + +1. Create a new GitLab connection in Blackbird. +2. Select **OAuth** as the connection type. +3. Click **Authorize connection**. +4. Follow the GitLab authorization flow and approve the requested access. +5. Return to Blackbird and confirm that the connection status is _Connected_. + +### Connecting to self-managed GitLab + +If your GitLab instance is hosted on a custom domain, use the **OAuth Self-managed** connection type in Blackbird. + +1. In your self-managed GitLab instance, navigate to **Admin area** -> **Applications** and click **Add new application**. +2. Enter an application name, for example _Blackbird Self-Managed Test_. +3. Set **Redirect URI** to `https://bridge.blackbird.io/api/AuthorizationCode`. +4. Save the application and copy the generated **Application ID** and **Secret**. +5. In Blackbird, create a new GitLab connection and choose **OAuth Self-managed** as the connection type. +6. Enter your GitLab instance URL as **Base URL**, for example `https://yourdomain.example.com`. +7. Paste the GitLab **Application ID** into **Client ID** and the GitLab **Secret** into **Client secret**. +8. Click **Authorize connection** and complete the OAuth consent flow in your self-managed GitLab instance. +9. Return to Blackbird and confirm that the connection has appeared and the status is _Connected_. + +### Connecting with a personal access token + +1. Create a personal access token with the scopes required for the actions you want to use. +2. In Blackbird, create a new GitLab connection and choose **Personal Access Token** as the connection type. +3. Paste the token into the **API key** field. +4. Save the connection and confirm that the status is _Connected_. + ## Actions ### Repositories diff --git a/image/README/1705402013379.png b/image/README/1705402013379.png index 94a49c4..4afb719 100644 Binary files a/image/README/1705402013379.png and b/image/README/1705402013379.png differ