Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What else can be extracted? #56

Open
sridamul opened this issue Jun 27, 2024 · 4 comments
Open

What else can be extracted? #56

sridamul opened this issue Jun 27, 2024 · 4 comments
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Comments

@sridamul
Copy link
Contributor

What feature do you want to see added?

This issue is to discuss what other metadata of a plugin can be useful

List of implemented metadata extraction:

  1. Plugin Name
  2. has License?
  3. has Developers Tag?
  4. has Java level?
  5. Uses Https instead of git?
  6. has Jenkins file?
  7. dependencies
  8. Jenkins version
  9. Plugin Parent (includes parent version)
  10. Property tags

Please feel free to add what other metadata of a plugin could be useful.

Upstream changes

No response

Are you interested in contributing this feature?

No response

@sridamul sridamul added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jun 27, 2024
@gounthar
Copy link
Collaborator

Used spotbug, and if so, what is the threshold level?

@sridamul
Copy link
Contributor Author

Used spotbug, and if so, what is the threshold level?

Can be determined via properties. (spotbugs.threshold)

Following is the Plugin Metadata extracted for gitlab-oauth-plugin

{
  "pluginName": "GitLab Authentication plugin",
  "isLicensed": true,
  "hasDevelopersTag": true,
  "hasJavaLevel": false,
  "usesHttps": true,
  "hasJenkinsfile": true,
  "dependencies": [
    {
      "gav": {
        "groupId": "io.jenkins.plugins",
        "artifactId": "caffeine-api"
      }
    },
    {
      "gav": {
        "groupId": "org.jenkins-ci.plugins",
        "artifactId": "apache-httpcomponents-client-4-api"
      }
    },
    {
      "gav": {
        "groupId": "org.jenkins-ci.plugins",
        "artifactId": "mailer"
      }
    },
    {
      "gav": {
        "groupId": "io.jenkins.plugins",
        "artifactId": "gitlab-api"
      }
    },
    {
      "gav": {
        "groupId": "org.jenkins-ci.plugins",
        "artifactId": "git"
      }
    },
    {
      "gav": {
        "groupId": "org.jenkins-ci.plugins",
        "artifactId": "jackson2-api"
      }
    }
  ],
  "jenkinsVersion": "2.387.3",
  "pluginParent": {
    "gav": {
      "groupId": "org.jenkins-ci.plugins",
      "artifactId": "plugin",
      "version": "4.82"
    }
  },
  "properties": {
    "revision": "1.20",
    "changelist": "-SNAPSHOT",
    "jenkins.version": "2.387.3",
    "spotbugs.effort": "Max",
    "spotbugs.threshold": "Low",
    "gitHubRepo": "jenkinsci/${project.artifactId}-plugin",
    "project.build.sourceEncoding": "UTF-8",
    "project.reporting.outputEncoding": "UTF-8",
    "project.basedir": "\\plugin-modernizer-tool\\test-plugins\\gitlab-oauth-plugin",
    "basedir": "\\plugin-modernizer-tool\\test-plugins\\gitlab-oauth-plugin"
  }
}

@jonesbusy
Copy link
Collaborator

For me I would be useful to know if a plugin is using a direct or transitive dependency not provided by an API plugin.

If would be good to have a mapping of api plugin and their dependency and raise the point when the dependency is found in the chain of dependency but the api plugin is not

Not sure if a metadata or just a recipe that will perform the change

There is already a recipe https://github.com/openrewrite/rewrite-jenkins/blob/main/src/main/java/org/openrewrite/jenkins/ReplaceLibrariesWithApiPlugin.java but we need to provide to the recipe input. I would expect that is recipe is called directly with correct argument

@sridamul
Copy link
Contributor Author

I would expect that is recipe is called directly with correct argument

Opened issue #58 to discuss about recipes with configuration parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

No branches or pull requests

3 participants