-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Jira tickets
Chelsea Boling edited this page Apr 4, 2023
·
5 revisions
We need the list of issue ids. Our official issues v2 docs are here: https://docs.fossa.com/docs/issues-api-configuration#listing-all-direct-licensing-issues-globally
For example, this is how to get the list of ids for vulnerability issues:
curl -G https://app.fossa.com/api/v2/issues \
-d 'category=vulnerability' \
-H 'Authorization: Bearer <token>' | jq -r '.issues | .[] | .id'
PUT https://app.fossa.com/api/v2/issues?category=licensing&scope%5Btype%5D=global&ids%5B0%5D=<first-id>&ids%5B1%5D=<additional-ids>
Query parameters: category=licensing&scope%5Btype%5D=global&ids%5B0%5D=<first-id>&ids%5B1%5D=<additional-ids>
Query parameters (decoded):
category: licensing | vulnerability
scope[type]: global
ids[0]: id-1
ids[1]: id-2
ids[n]: id-n
Request Payload:
{
"type": "export",
"jira": {
"title": "title",
"description": "description",
"trackerId": "project-id",
"jiraId": 1322,
"issueType": "Bug",
"labels": ["label-1", "label-2", "label-n"]
}
}
Notes: Quick way to get the jiraId is to open up devtools, create a test ticket get the id from the request payload.
PUT https://app.fossa.com/api/v2/issues?category=licensing&scope%5Btype%5D=global&ids%5B0%5D=3178366&ids%5B1%5D=3178375&ids%5B2%5D=3178372
Query parameters: category=licensing&scope%5Btype%5D=global&ids%5B0%5D=3178366&ids%5B1%5D=3178375&ids%5B2%5D=3178372
Query parameters (decoded):
category: licensing
scope[type]: global
ids[0]: 3178366
ids[1]: 3178375
ids[2]: 3178372
Request payload: Notes: Description can have up to 32767 characters. The description is written in markdown.
{
"type": "export",
"jira": {
"title": "[FOSSA] 3 Issues found in 3 dependencies",
"description": "## Flagged - JSR-250 Common Annotations for the JavaTM Platform (1.0)\n\nYour policy has flagged the CDDL-1.0 license for review.\n\n[View issue on FOSSA](https://app.fossa.com/issues/licensing/3178366)\n\n### Package URL\n\n[JSR-250 Common Annotations for the JavaTM Platform](http://jcp.org/aboutJava/communityprocess/final/jsr250/index.html)\n\n### Affected Projects\n\n- [dependency-tests](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fdependency-tests)\n- [ghas-bootcamp](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-bootcamp)\n- [ghas-jira-integration](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-jira-integration)\n\n### Licenses found by FOSSA\n\n- CDDL-1.0\n\n\n\n## Flagged - Bouncy Castle Provider (1.68)\n\nYour policy has flagged the BouncyCastle license for review.\n\n[View issue on FOSSA](https://app.fossa.com/issues/licensing/3178375)\n\n### Package URL\n\n[Bouncy Castle Provider](https://www.bouncycastle.org/java.html)\n\n### Affected Projects\n\n- [dependency-tests](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fdependency-tests)\n- [ghas-bootcamp](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-bootcamp)\n- [ghas-jira-integration](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-jira-integration)\n\n### Licenses found by FOSSA\n\n- BouncyCastle\n\n\n\n## Flagged - Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (1.68)\n\nYour policy has flagged the BouncyCastle license for review.\n\n[View issue on FOSSA](https://app.fossa.com/issues/licensing/3178372)\n\n### Package URL\n\n[Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs](https://www.bouncycastle.org/java.html)\n\n### Affected Projects\n\n- [dependency-tests](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fdependency-tests)\n- [ghas-bootcamp](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-bootcamp)\n- [ghas-jira-integration](https://app.fossa.com/projects/git%2Bgithub.com%2Fcmboling%2Fghas-jira-integration)\n\n### Licenses found by FOSSA\n\n- BouncyCastle\n\n---\n\nGenerated by [FOSSA](https://app.fossa.com) on 03/24/2023\n\nTicket generated by FOSSA user: [email protected]\n",
"trackerId": "BOBA",
"jiraId": 1322,
"issueType": "Bug",
"labels": ["red-team", "critcal"]
}
}