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

Number of open issues #143

Open
alecharp opened this issue Dec 2, 2022 · 16 comments · May be fixed by #353
Open

Number of open issues #143

alecharp opened this issue Dec 2, 2022 · 16 comments · May be fixed by #353
Assignees
Labels
enhancement New feature or request probe Related to probe implementation

Comments

@alecharp
Copy link
Collaborator

alecharp commented Dec 2, 2022

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

@alecharp alecharp added enhancement New feature or request probe Related to probe implementation labels Dec 2, 2022
@alecharp
Copy link
Collaborator Author

alecharp commented Jan 19, 2023

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

@jleon33
Copy link
Collaborator

jleon33 commented Jan 19, 2023

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

@alecharp
Copy link
Collaborator Author

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

@dheerajodha
Copy link
Member

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?

@alecharp
Copy link
Collaborator Author

alecharp commented Mar 8, 2023

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.

@dheerajodha
Copy link
Member

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?

@alecharp
Copy link
Collaborator Author

alecharp commented Mar 8, 2023

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.

@Jagrutiti
Copy link
Member

Jagrutiti commented Jul 22, 2023

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
Copy link
Member

Jagrutiti commented Jul 22, 2023

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.

@hervelemeur
Copy link

hervelemeur commented Jul 22, 2023

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)

@Jagrutiti Jagrutiti linked a pull request Jul 23, 2023 that will close this issue
@Jagrutiti Jagrutiti moved this from 📋 Backlog to 🏗 In progress in Plugin Health Scoring GSoC 2023 Jul 24, 2023
@Jagrutiti
Copy link
Member

Thanks for sharing @hervelemeur

infra-reports did help.

@Jagrutiti
Copy link
Member

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.

@hervelemeur
Copy link

What would you like to know about this API call?

@Jagrutiti
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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 Jagrutiti moved this from 🏗 In progress to 👀 In review in Plugin Health Scoring GSoC 2023 Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request probe Related to probe implementation
Projects
No open projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

5 participants