jenkinsci / violation-comments-to-gitlab-plugin

Comments GitLab merge requests with static code analyzer findings.
https://plugins.jenkins.io/violation-comments-to-gitlab
MIT License
20 stars 4 forks source link

Support GitLab plugin GitLab API token credential type #22

Closed ite-klass closed 5 years ago

ite-klass commented 5 years ago

When the GitLab plugin is installed, a credential category for personal API tokens is available.

This plugin could then make use of this more specific one instead of the generic "secret text" category.

At the moment it does not support GitLab API token credentials at all.

tomasbjerre commented 5 years ago

To clarify, GitLab API token can be specified from a credential or with just a string:

  // Specify one of these
  apiToken: '6xRcmSzPzzEXeS2qqr7R',
  apiTokenCredentialsId: 'id',

In order to support the credential category used by the GitLab plugin I think a dependency is needed on that plugin. I don't want to add such a dependency.

The Gitlab plugin is terribly maintained. Look at the open issues and the PR:s. Even if it was better supported I would not recommend anyone to use it. I think it is overly complex. And I would recommend the simpler generic webhook instead.

As there are many ways of integrating GitLab with Jenkins, it does not make sense to have this plugin depend on one of them.

Adding a dependency would polute the classpath of this plugin.