Add pull requests (technical preview)
You can use a PUT operation to inject pull requests related to your backlog items from your SCM system into OpenText Core Software Delivery Platform.
Note that this can also be done directly using the Jenkins plugin, as described in Track pull requests in your SCM system.
Flow
To manually inject pull requests to the OpenText Core Software Delivery Platform server:
-
Authenticate and sign in as a user with the necessary permissions.
-
Inject the pull requests using the pull requests custom resource.
-
Check the status of the PUT operation.
Inject the pull requests
Use the PUT operation to add a payload containing the pull requests from your CI.
http[s]://<server>:<port>/api/shared_spaces/<sharedspaceId>/workspaces/<Workspaceid>/analytics/ci/pull-requests
Payload example:
[ { "id": "3", "state": "merged", "title": "Br22222", "description": "Br02 description", "createdTime": 1580682531000, "updatedTime": 1580818014000, "mergedTime": null, "closedTime": null, "authorName": "John", "authorEmail": "John@gmail.com", "sourceRepository": { "type": "git", "url": "https://github.com/John/trial.git", "branch": "br02" }, "targetRepository": { "type": "git", "url": "https://github.com/John/trial.git", "branch": "master" }, "selfUrl": "https://github.com/John/trial/pull/3", "commits": [ { "time": 1580817182000, "user": "GitHub", "userEmail": "noreply@github.com", "revId": "21dd095020a388d1e05a6bc35a045ab4363c9d70", "parentRevId": "d1aed9cbf1c53c6cf105fcafcdcdebae4410c819", "comment": "user story #3004 : additional defect", "changes": null }, { "time": 1580729667000, "user": "GitHub", "userEmail": "noreply@github.com", "revId": "d1aed9cbf1c53c6cf105fcafcdcdebae4410c819", "parentRevId": "1a017b5b30fb9113bd9364eab7e7c95ea4edc363", "comment": "defect #3002: Update text2.txt", "changes": null }, { "time": 1580682402000, "user": "GitHub", "userEmail": "noreply@github.com", "revId": "35da1b2a45d1a774031dd4c12429d5c4d6039c65", "parentRevId": "24a0c34d9e7b2e94097434917a5246ab0241afd8", "comment": "Update text2.txt", "changes": null } ], "merged": true }, { "id": "1", "state": "open", "title": "Br01", "description": "Br01 desc - update1", "createdTime": 1580682296000, "updatedTime": 1580818179000, "mergedTime": null, "closedTime": null, "authorName": "John", "authorEmail": "John@gmail.com", "sourceRepository": { "type": "git", "url": "https://github.com/John/trial.git", "branch": "br01" }, "targetRepository": { "type": "git", "url": "https://github.com/John/trial.git", "branch": "master" }, "selfUrl": "https://github.com/John/trial/pull/1", "commits": [ { "time": 1580817159000, "user": "GitHub", "userEmail": "noreply@github.com", "revId": "6f2fbff2f003c87dcb4803ac460fb27579456833", "parentRevId": "7d8e4876fde03c53c55180b984735e56319834ef", "comment": "defect #4004: stam defect", "changes": null }, { "time": 1580682267000, "user": "GitHub", "userEmail": "noreply@github.com", "revId": "641d751095fc30ef1bb90c70f248d05eb606f45c", "parentRevId": "24a0c34d9e7b2e94097434917a5246ab0241afd8", "comment": "Update text1.txt", "changes": null } ], "merged": false } ]
Check the status
Make sure the pull requests were successfully added.
- Check the return code. A return code of 200 indicates success.
- Check if the pull requests exist. For details, see Track pull requests.
See also: