plugin-health-scoring icon indicating copy to clipboard operation
plugin-health-scoring copied to clipboard

Number of open issues

Open alecharp opened this issue 3 years ago • 16 comments

Having the number of issues for a plugin can help understand the interaction between the users and the maintainers.

alecharp avatar Dec 02 '22 14:12 alecharp

Issues can be in GitHub or in Jira. Some plugins have specified that in their POM file and by doing so, it's advertised in the update-center. However, not all plugins have that.

I can create a probe which would count the issues and we would have a list of plugins which we need to attend to in order to improve their project configuration (adding the missing information in the POM file). As long as we don't use this metric in a scoring process, we won't be discriminating any plugin. WDYT @jleon33 ?

Precision: I was wrong, it's not in the POM file of the project but in the repository-permissions-updater files. See https://github.com/jenkins-infra/repository-permissions-updater/blob/master/permissions/plugin-Exclusion.yml#L4-L5

alecharp avatar Jan 19 '23 16:01 alecharp

Hmmm.... Does the project have a stance on this, as in do we have a preferred method for tracking open issues?

jleon33 avatar Jan 19 '23 17:01 jleon33

the common way was to say: use Jira. but now, some maintainers prefer GitHub issues over Jira.

alecharp avatar Jan 20 '23 14:01 alecharp

For a given plugin, we can use update-center to understand which site it is using to track open issues, whether it is GH or JIRA or both GH and JIRA. I'm thinking about how would we fetch the open-issues count from these sites. We can get it easily from GH without any rate limit issues, but I'm curious about how we can get this info from JIRA.

Currently, we can use this JQL (refer this) to get the open issues present within a component of a specific JIRA project: https://host:port/context/rest/api/latest/search?jql=component=${component-number}%20AND%20status=open. I've tried adding the required values to this URL and I'm able to get the count of open issues for a given plugin. But the rate limits of JIRA API are quite strict, it says "Your add-on can make 500 API requests per 5 minutes", which is not sufficient for us.

Wdyt?

dheerajodha avatar Mar 02 '23 08:03 dheerajodha

We can get it easily from GH without any rate limit issues

I'm not sure. We are already using a lot of calls to GH but we will see.

About Jira, I'm not sure this documentation is about the Jenkins instance but about the cloud hosted ones (*.atlassian.com). But I haven't look at that for the moment. Give it a try.

alecharp avatar Mar 08 '23 08:03 alecharp

Give it a try.

you mean, to try looking at the jira docs for the Jenkins instance? I don't know where to find that. Or are you suggesting start working on this issue and then we'll figure out these API rate limit issues later when we hit them in the future?

dheerajodha avatar Mar 08 '23 15:03 dheerajodha

yes, try to work on the probe so we can see if there is a limitation. If so, we will see how we can work on it.

alecharp avatar Mar 08 '23 22:03 alecharp

We can integrate Jenkins with JIRA: https://support.atlassian.com/jira-cloud-administration/docs/integrate-with-jenkins/

We can use JQL and create something like the first example in the doc: project = "New office" and status = "open".

Jagrutiti avatar Jul 22 '23 15:07 Jagrutiti

I got the count for our repository using GitHub API: https://api.github.com/search/issues?q=repo:jenkins-infra/plugin-health-scoring+type:issue+state:open

Are we using this one for GitHub?

I went through this API: https://github-api.kohsuke.org/ but I do not think this will help us. It only helps with authentication.

Jagrutiti avatar Jul 22 '23 15:07 Jagrutiti

Instead of giving an additional app access to Jira, another possibility could be to extend and use the data gathered by https://github.com/jenkins-infra/infra-reports and/or https://github.com/jenkins-infra/plugin-site-api, WDYT? (At least these repos can help for inspiration)

hervelemeur avatar Jul 22 '23 17:07 hervelemeur

Thanks for sharing @hervelemeur

infra-reports did help.

Jagrutiti avatar Jul 29 '23 12:07 Jagrutiti

I see this API being called: https://issues.jenkins.io/rest/api/2/group/member?groupname=jira-users

in https://github.com/jenkins-infra/infra-reports/blob/main/jira-users-report/user-report.sh but cannot find a documentation.

Jagrutiti avatar Jul 29 '23 12:07 Jagrutiti

What would you like to know about this API call?

hervelemeur avatar Jul 29 '23 14:07 hervelemeur

The infra-reports already returns jira users: https://github.com/jenkins-infra/infra-reports/blob/main/jira-users-report/user-report.sh

It invokes this API: https://issues.jenkins.io/rest/api/2/group/member?groupname=jira-users

But I am not able to find any documentation on this API.

I was wondering if I can tweak this API and return number of open issues in JIRA based on component.

The issueTracker in update-center gives the following information about a plugin that uses JIRA.

 "issueTrackers": [
        {
          "reportUrl": "https://www.jenkins.io/participate/report-issue/redirect/#27424",
          "type": "jira",
          "viewUrl": "https://issues.jenkins.io/issues/?jql=component=27424"
        }
      ],

Jagrutiti avatar Jul 29 '23 14:07 Jagrutiti

This dashboard: https://issues.jenkins.io/secure/Dashboard.jspa

Does display all JIRA issues with their count. I was hoping to fetch the total in my project.

Jagrutiti avatar Jul 29 '23 14:07 Jagrutiti

I can use this documentation: https://developer.atlassian.com/server/jira/platform/rest-apis/

With the following syntax? http://host:port/context/rest/api-name/api-version/resource-name

The http://host:port/context/ in our case would be https://issues.jenkins.io/?

Jagrutiti avatar Jul 29 '23 15:07 Jagrutiti