Share this page

# Add pull requests into ALM Octane (technical preview)

You can use a PUT operation to inject pull requests related to your backlog items from your SCM system into ALM Octane.

Note that this can also be done directly using the Jenkins plugin, as described in Track pull requests in your SCM system.

In this topic:

## Flow

To manually inject pull requests to the ALM Octane server:

1. Authenticate and sign in as a user with the necessary permissions.

2. Inject the pull requests using the pull requests custom resource into ALM Octane.

3. Check the status of the PUT operation.

Back to top

## Inject the pull requests into ALM Octane

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
      }
    ]

Back to top

## Check the status

Make sure the pull requests were successfully added into ALM Octane.

1. Check the return code. A return code of 200 indicates success.
2. Check if the pull requests exist in ALM Octane. For details, see Track pull requests in ALM Octane.

See also:

- Add a log into ALM Octane (technical preview)
- Add vulnerability issues into ALM Octane

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ALM Octane Help Center ALM Octane Help 15.1.90 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: