Number of open issues
Having the number of issues for a plugin can help understand the interaction between the users and the maintainers.
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
Hmmm.... Does the project have a stance on this, as in do we have a preferred method for tracking open issues?
the common way was to say: use Jira. but now, some maintainers prefer GitHub issues over Jira.
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?
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.
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?
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.
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".
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.
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)
Thanks for sharing @hervelemeur
infra-reports did help.
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.
What would you like to know about this API call?
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"
}
],
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.
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/?