Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleExample topic

1

Click Create Topic

2

Enter a topic name

...

POST data to PubSub from Jira via iHub

Expand
titleiHub Cloud steps to post

...

to a topic

1

Click on Integrations

Click Create Integration

Image Modified

2

Enter a name. Note that the integration is disabled until we toggle the enabled flag.

Image Modified
3

Click Trigger

Select Issue event

Select Issue created

Add an JQL to filter when to trigger

Image Modified

4

Click Add new Action

Select Web Action

Image Modified
5

Enter a name of the action, can be anything.

Select POST

Enter the url below and change the TOPIC_ID to be the one you used. The messages in the request will be published on this topic. Format is projects/{project}/topics/{topic}.

Code Block
https://pubsub.googleapis.com/v1/{TOPIC_ID}:publish

Select PubSub [OAuth2] created in prerequisite tutorial here Google Authentication Setup

Enter body

More on how the body can be structured is found here https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/publish

Code Block
{
  "messages": [
     {
         "data": "{{issue.toString}}",
         "attributes": {
         "issuekey": "{{issue.key}}",
         "projectKey": "{{issue.project.key}}"
        }
    }
  ]
}
Image ModifiedImage Modified

6

Save the integration

Goto the project that match the JQL for the trigger and create an issue.

Subscribe to data from PubSub from Jira via iHub

Expand
titleiHub Cloud steps to get messages from a PubSub

1

Click on Integrations

Click Create Integration

Image Added

2

Enter a name. Note that the integration is disabled until we toggle the enabled flag.

Image Added

3

Click Trigger

Select Issue event

Select Issue updated

Add an JQL to filter when to trigger

Image Added

4

Click Add new Action

Select Web Action

Image Added
5

Enter a name of the action, can be anything.

Select POST

Enter the url below and change the TOPIC_ID to be the one you used. The subscription from which messages should be pulled. Format is projects/{project}/subscriptions/{sub}.

Code Block
https://pubsub.googleapis.com/v1/{subscription}:pull

Select PubSub [OAuth2] created in prerequisite tutorial here Google Authentication Setup

Enter body

More on how the body can be structured is found here https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/pull

Code Block
{
  "maxMessages": 1
}

Image AddedImage Added

6

Save the integration

Goto the project that match the JQL for the trigger and update an issue.