Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to generate list of Jira tickets with Pull reques(Git hub), Auth and reviewer pending

satish_1_badiger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2025

Wanted a script to generate report of Jira ticket linked with Github Pull Request, owner, repo, status and reviewer details.

An Example is attached for reference.

Screenshot 2025-07-18 160817.png

1 answer

0 votes
Hari Krishna
Contributor
July 20, 2025

HI @satish_1_badiger ,

To generate a report listing Jira tickets linked with GitHub Pull Requests, including the PR owner, repository, status, reviewer, aging, and sprint information, follow this approach:

Query Jira for issues with linked Pull Requests using a suitable JQL:


issueFunction in hasPullRequest()

Use Jira REST API to fetch details for each issue:

Endpoint:

GET /rest/api/2/issue/{issueIdOrKey}?expand=renderedFields,names,fields

Extract fields such as:

  • Issue key
  • Sprint (custom field)
  • Development info (linked PR URL, repo, etc.)

Use GitHub REST API to fetch PR metadata:

  • Endpoint:

          GET /repos/{owner}/{repo}/pulls/{pull_number}

  • Extract the following:
  • Pull request title
  • PR status (open/closed/merged)
  • PR author
  • Reviewer(s)
  • Created and updated dates
  • Combine the Jira and GitHub data:
  • Match issues and PRs
  • Calculate aging (e.g., current date - PR created date)

Add sprint and status details

Export the results into an HTML table or CSV format for easy sharing.

Reference:

This method helps in tracking engineering progress and identifying review bottlenecks across sprints.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events