gitlab-branch-source-plugin
gitlab-branch-source-plugin copied to clipboard
Add warning while setting a GitLab Multipipeline project or organization folders without Credentials
The PR addresses this issue. While setting up a GitLab multipipeline project or organization folders, a user can choose to not provide any credentials which can lead to an error downstream. A way to mitigate this is by adding a warning for users to add credentials while still letting them proceed further in the process.
In order to do this, a new validation check doCheckCredentialsId
has been added to gitlab-branch-source-plugin/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMSource.java
and gitlab-branch-source-plugin/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabSCMNavigator.java
which checks if credentials are provided or not. The implementation of these is based on the existing Gitea plugin.
Screenshots of the outcome attached below.
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue