Run Gitlab CI job only once when MR open - gitlab

I have a scenario in Gitlab where I would like to ping a particular Slack channel when an MR is opened up for the first time in Gitlab. I've attempted to use rules for triggering when the source is merge_request_event but, unfortunately, this also triggers my job when a new commit is pushed to the open MR.
Is it possible to run a Gitlab CI job once when the MR is initially opened, and never again after that point, even when new commits are added to the MR?
ping:
stage: .pre
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- 'curl to slack url'

For your use case, you wouldn't be able to use GitLab CI/CD because a Merge Request Pipeline is started when a Merge Request is opened, a commit is pushed to the source branch of the Merge Request, or if someone hits the Run Pipeline button from the Pipelines tab on a Merge Request.
Those are the only ways to start a Merge Request pipeline, but any of those will always start a pipeline.
Instead of doing this in CI/CD, your best bet is to create a small application that can listen for GitLab Webhooks, and specifically react to Merge Request events where the action field is open. Here's an example Merge Request Open event from the docs.
{
"object_kind": "merge_request",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin#example.com"
},
"project": {
"id": 1,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlabhq/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git#example.com:gitlabhq/gitlab-test.git",
"git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
"namespace":"GitlabHQ",
"visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master",
"homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git#example.com:gitlabhq/gitlab-test.git",
"http_url":"http://example.com/gitlabhq/gitlab-test.git"
},
"repository": {
"name": "Gitlab Test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlabhq/gitlab-test"
},
"object_attributes": {
"id": 99,
"target_branch": "master",
"source_branch": "ms-viewport",
"source_project_id": 14,
"author_id": 51,
"assignee_id": 6,
"title": "MS-Viewport",
"created_at": "2013-12-03T17:23:34Z",
"updated_at": "2013-12-03T17:23:34Z",
"milestone_id": null,
"state": "opened",
"merge_status": "unchecked",
"target_project_id": 14,
"iid": 1,
"description": "",
"source": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git#example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git#example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"target": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git#example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git#example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"last_commit": {
"id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"message": "fixed readme",
"timestamp": "2012-01-03T23:36:29+02:00",
"url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"author": {
"name": "GitLab dev user",
"email": "gitlabdev#dv6700.(none)"
}
},
"work_in_progress": false,
"url": "http://example.com/diaspora/merge_requests/1",
"action": "open",
"assignee": {
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
}
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"changes": {
"updated_by_id": {
"previous": null,
"current": 1
},
"updated_at": {
"previous": "2017-09-15 16:50:55 UTC",
"current":"2017-09-15 16:52:00 UTC"
},
"labels": {
"previous": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"current": [{
"id": 205,
"title": "Platform",
"color": "#123123",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "Platform related issues",
"type": "ProjectLabel",
"group_id": 41
}]
}
}
}
The key things here for you are the object_kind field at the top since this will be issue, merge_request, push, tag_push, etc. and we can filter on merge_request. Next, the action field will tell us what happened with the Merge Request. In this example the value is open which means the Merge Request was opened. Other values are close, reopen, update, approved, unapproved, and merge.
Currently, this is the only way to find out if a Merge Request was opened without the other events that start a Merge Request Pipeline.

Related

GitLab: how to get the label added date by GitLab API

I'm using GitLab 15.3.1 version and I'd like to obtain, using GitLab API, the label added date for a project issue.
This information is available from GitLab web browser interface as shown below
Is there any way to obtain that "11/10/2022 2.44pm" via API for that issue?
Thank you in advance
You can get Label events for a single Issue with the List project issue label events API.
Here's an example using this Issue:
curl --header 'Authorization: Bearer xxxTOKENxxx' https://gitlab.com/api/v4/projects/278964/issues/378378/resource_label_events | jq '.'
Response:
[
{
"id": 192875035,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 17963221,
"name": "application performance::active",
"description": " Any issues that group::application performance has scheduled and is working on. They are in the build phase of the product development flow.",
"description_html": " Any issues that group::application performance has scheduled and is working on. They are in the build phase of the product development flow.",
"text_color": "#FFFFFF",
"color": "#69D100"
},
"action": "add"
},
{
"id": 192875036,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 10690783,
"name": "group::application performance",
"description": "Issues belonging to the Application Performance group (formerly known as Memory) of the Enablement stage of the DevOps lifecycle. See https://about.gitlab.com/handbook/product/categories/#application-performance-group",
"description_html": "Issues belonging to the Application Performance group (formerly known as Memory) of the Enablement stage of the DevOps lifecycle. See https://about.gitlab.com/handbook/product/categories/#application-performance-group",
"text_color": "#333333",
"color": "#A8D695"
},
"action": "add"
},
{
"id": 192875037,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 15119514,
"name": "type::maintenance",
"description": "Upkeeping efforts and catch-up corrective improvements that are not Feature nor Bugs. Read more at https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification",
"description_html": "Upkeeping efforts and catch-up corrective improvements that are not Feature nor Bugs. Read more at https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification",
"text_color": "#FFFFFF",
"color": "#330066"
},
"action": "add"
},
{
"id": 192875043,
"user": {
"id": 1786152,
"username": "gitlab-bot",
"name": "🤖 GitLab Bot 🤖",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/1786152/avatar.png",
"web_url": "https://gitlab.com/gitlab-bot"
},
"created_at": "2022-10-19T08:51:16.579Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 25316145,
"name": "devops::data_stores",
"description": "Issues for the Systems stage of the DevOps lifecycle (Memory, Database, Global Search, Sharding)",
"description_html": "Issues for the Systems stage of the DevOps lifecycle (Memory, Database, Global Search, Sharding)",
"text_color": "#FFFFFF",
"color": "#E44D2A"
},
"action": "add"
},
{
"id": 192875044,
"user": {
"id": 1786152,
"username": "gitlab-bot",
"name": "🤖 GitLab Bot 🤖",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/1786152/avatar.png",
"web_url": "https://gitlab.com/gitlab-bot"
},
"created_at": "2022-10-19T08:51:16.579Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 14918396,
"name": "section::enablement",
"description": "Issues related to the Enablement section",
"description_html": "Issues related to the Enablement section",
"text_color": "#FFFFFF",
"color": "#F0AD4E"
},
"action": "add"
},
{
"id": 192875250,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:52:13.714Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 2526320,
"name": "workflow::in dev",
"description": "Issues that are actively being worked on by a developer",
"description_html": "Issues that are actively being worked on by a developer",
"text_color": "#FFFFFF",
"color": "#428BCA"
},
"action": "add"
},
{
"id": 192875320,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:52:28.908Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 2526320,
"name": "workflow::in dev",
"description": "Issues that are actively being worked on by a developer",
"description_html": "Issues that are actively being worked on by a developer",
"text_color": "#FFFFFF",
"color": "#428BCA"
},
"action": "remove"
}
]

Sharepoint REST API - post comment on behalf of another user

There is a way of how to add comments to Sharepoint site using REST API. It is explained here https://beaucameron.com/2021/01/18/add-comments-to-sharepoint-list-items-using-the-rest-api/ for example.
But when I add comment like this, it adds it on behalf of my name - because REST endpoint is accessed using access token, which is linked to my e-mail.
I'd like to migrate comments from one site to the other, and keep original authors.
Is there a way to post comments on behalf of other users?
I tried this POST body:
{
"__metadata": {
"type": "Microsoft.SharePoint.Comments.comment"
},
"text": "Some new comment",
"author": {
"__metadata": {
"type": "SP.Sharing.Principal"
},
"email": "AlexW#OnMicrosoft.com",
"id": 18,
"loginName": "i:0#.f|membership|alexw#onmicrosoft.com",
"name": "Alex Wilber",
"principalType": 1
}
}
But still, comment is posted on behalf of my name. The response is like the following:
{
"d": {
"__metadata": {
"id": "https://sharepoint.com/_api/web/lists('017dd808-5a37-4d65-89f9-b5ce994554b4')/GetItemById(1)/Comments(15)",
"uri": "https://sharepoint.com/_api/web/lists('017dd808-5a37-4d65-89f9-b5ce994554b4')/GetItemById(1)/Comments(15)",
"type": "Microsoft.SharePoint.Comments.comment"
},
"likedBy": {
"__deferred": {
"uri": "https://sharepoint.com/_api/web/lists('017dd808-5a37-4d65-89f9-b5ce994554b4')/GetItemById(1)/Comments(15)/likedBy"
}
},
"replies": {
"__deferred": {
"uri": "https://sharepoint.com/_api/web/lists('017dd808-5a37-4d65-89f9-b5ce994554b4')/GetItemById(1)/Comments(15)/replies"
}
},
"author": {
"__metadata": {
"type": "SP.Sharing.Principal"
},
"email": "myName.mySurname#onmicrosoft.com",
"expiration": null,
"id": 12,
"isActive": true,
"isExternal": false,
"jobTitle": null,
"loginName": "i:0#.f|membership|myName.mySurname#onmicrosoft.com",
"name": "myName mySurname",
"principalType": 1,
"userId": null,
"userPrincipalName": null
},
"createdDate": "2022-05-24T08:40:19.0841947Z",
"id": "15",
"isLikedByUser": false,
"isReply": false,
"itemId": 1,
"likeCount": 0,
"listId": "017dd808-5a37-4d65-89f9-b5ce994554b4",
"mentions": null,
"parentId": "0",
"replyCount": 0,
"text": "Some new comment"
}
}
So still, I'm the author of the comment...

Azure Logic App, deployed using DevOps, first step "When a HTTP request is received", how to get the URL as output variable

Long title: Azure Logic App, deployed using DevOps, first step "When a HTTP request is received", how to get the URL as output variable for use in deployment of App Service calling this Logic App?
My azure application is composed of two parts:
a Logic App
an App Service (web)
which are both deployed using DevOps.
The first step of the logic app is "When a HTTP request is received".
The web has a dependency on the generated url
(e.g. https://prod-23.usgovarizona.logic.azure.us:443/workflows/.../triggers/request/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Frequest%2Frun&sv=1.0&sig=...) of the logic app.
How do I get the URL of the logic apps' first step as an output variable,
so that I can supply that value in the deployment of the App Service,
which calls the Logic App?
I looked at https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-outputs?tabs=azure-powershell but that didn't help me.
release.json
{
"source": 2,
"revision": 59,
"description": null,
"lastRelease": {
"id": 853,
"name": "Release-37",
"artifacts": [],
"_links": {},
"description": "Triggered by SMS Scheduler 2020.206.01.",
"releaseDefinition": {
"id": 14,
"projectReference": null,
"_links": {}
},
},
"variables": {
"depr_AppTeam": {
"value": "SDIS"
},
"depr_DeptAbbr": {
"value": "ENT"
},
"depr_ResourceGroupName": {
"value": "$AppTeam+ \"-\"+ $AppName +\"-\"+$Env + \"-rg\""
}
},
"variableGroups": [
43
],
"environments": [
{
"id": 24,
"name": "DEV",
"rank": 1,
"variables": {},
"variableGroups": [],
"deployStep": {
"id": 90
},
"deployPhases": [
{
"deploymentInput": {
"parallelExecution": {
"parallelExecutionType": 0
},
"agentSpecification": {
"identifier": "vs2017-win2016"
},
"skipArtifactsDownload": false,
"artifactsDownloadInput": {
"downloadInputs": []
},
"queueId": 64,
"demands": [],
"enableAccessToken": false,
"timeoutInMinutes": 0,
"jobCancelTimeoutInMinutes": 1,
"condition": "succeeded()",
"overrideInputs": {}
},
"rank": 1,
"phaseType": 1,
"name": "Agent job",
"refName": null,
"workflowTasks": [
{
"environment": {},
"taskId": "94a...",
"version": "2.*",
"name": "Azure Deployment:Create Or Update Resource Group action on $(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg",
"refName": "",
"enabled": true,
"alwaysRun": false,
"continueOnError": false,
"timeoutInMinutes": 0,
"definitionType": "task",
"overrideInputs": {},
"condition": "succeeded()",
"inputs": {
"ConnectedServiceName": "nov...",
"action": "Create Or Update Resource Group",
"resourceGroupName": "$(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg",
"location": "USGov Arizona",
"templateLocation": "Linked artifact",
"csmFileLink": "",
"csmParametersFileLink": "",
"csmFile": "$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/template.json",
"csmParametersFile": "$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/parameters.json",
"overrideParameters": "",
"deploymentMode": "Incremental",
"enableDeploymentPrerequisites": "None",
"deploymentGroupEndpoint": "",
"project": "",
"deploymentGroupName": "",
"copyAzureVMTags": "true",
"runAgentServiceAsUser": "false",
"userName": "",
"password": "",
"outputVariable": "",
"deploymentName": "",
"deploymentOutputs": "",
"addSpnToEnvironment": "false"
}
},
]
}
],
},
],
"triggers": [
{
"artifactAlias": "_ent_sms_scheduler",
"triggerConditions": [],
"triggerType": 1
}
],
"releaseNameFormat": "Release-$(rev:r)",
"tags": [],
"properties": {
"DefinitionCreationSource": {
"$type": "System.String",
"$value": "ReleaseNew"
},
"IntegrateJiraWorkItems": {
"$type": "System.String",
"$value": "false"
},
"IntegrateBoardsWorkItems": {
"$type": "System.String",
"$value": "False"
}
},
"id": 14,
"name": "SMS SCHEDULER",
"path": "\\",
"projectReference": null,
"url": "https://vsrm.dev.azure.com/.../.../_apis/Release/definitions/14",
"_links": {
"self": {
"href": "https://vsrm.dev.azure.com/.../.../_apis/Release/definitions/14"
},
"web": {
"href": "https://dev.azure.com/.../.../_release?definitionId=14"
}
}
}
release task:
steps:
- task: AzureResourceGroupDeployment#2
displayName: 'Azure Deployment:Create Or Update Resource Group action on $(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg'
inputs:
azureSubscription: 'ENT-eComm-Deployment-NonProd-Gov-Connection'
resourceGroupName: '$(AppTeam)-$(AppName)-$(Release.EnvironmentName)-rg'
location: 'USGov Arizona'
csmFile: '$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/template.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/_ent_sms_scheduler/Job1/parameters.json'
It seems that you deploy Azure Logic App first, and then App Service.
You can add an Azure Powershell task after you deploy the Azure Logic app. Call Get-AzLogicAppTriggerCallbackUrl
command to get specific Logic App trigger callback URL. Example:
Get-AzLogicAppTriggerCallbackUrl -ResourceGroupName "ResourceGroup11" -Name "LogicApp1" -TriggerName "manual"
Value
-----
https://prod-03.westus.logic.azure.com:443/workflows/c4ed9335bc864140a11f4508d19acea3/triggers/manual/run?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=
And then you can define variables whose value is the response URL. Follow use variables as inputs and detailed sample to output this variable to following tasks.

Creating a Meeting in JSON Format issue

Is there any way to create a Calendar entry using a mailfile where the Organizer is not the mailfile Owner?
For example:
http://mycompanycom/mail/utils.nsf/api/calendar/events
I want to use a gereric mailfile where DAS is enabled and make all request against it; otherwise I'll need to query every Organizer's mailfile.
The only way I can make it to work is when I set the organizer the same as the mailfile owner, for example:
http://mycompany.com/mail1/ndev1.nsf/api/calendar/events
Here Notes Dev1 is the Owner for ndev1.nsf
{
"events": [
{
"summary": "TEST FEB 2018",
"location": "TEST LOCATION - NOT NEEDED",
"description": "",
"CalendarDateTime": {
"date": "2018-02-26",
"time": "17:00:00",
"utc": true
},
"start": {
"date": "2018-02-26",
"time": "17:00:00",
"utc": true
},
"end": {
"date": "2018-02-26",
"time": "18:00:00",
"utc": true
},
"class": "public",
"transparency": "opaque",
"sequence": 0,
"x-lotus-noticetype": "I",
"attendees": [
{
"role": "chair",
"status": "accepted",
"rsvp": false,
"displayName": "Notes Dev1/MYCOMPANY",
"email": "notes.dev1#mycompany.com"
},
{
"role": "req-participant",
"status": "needs-action",
"rsvp": true,
"displayName": "Pablo Solano/MYCOMPANY",
"email": "pablo.solano#mycompany.com"
},
{
"role": "req-participant",
"status": "needs-action",
"rsvp": true,
"displayName": "Notes Dev2/MYCOMPANY",
"email": "notes.dev2#mycomany.com"
},
{
"role": "req-participant",
"userType": "room",
"status": "accepted",
"rsvp": true,
"email": "maar#teradyne.com"
}
],
"organizer": {
"displayName": "Notes Dev1/MYCOMPANY",
"email": "notes.dev1#mycompany.com"
}
}
]
}
I found this url: http://www-10.lotus.com/ldd/ndseforum.nsf/xpTopicThread.xsp?documentId=CB20A0E36EE82AB385258154003B0A86
with this text:
One important caveat: The organizer property must match the owner of the database as specified in the request URL (/{database}/api/calendar/events).
I see few options for you:
Quick&dirty - change/add current user as owner of the calendar on the fly every time. Not recommended.
Make your code to work on behalf of universal identity, which is also owner of the calendar. Caveat: meeting will be arranged by that identity.
Create the meeting from user's calendar. Probably that's not what you want.

Dialogflow - Fulfillment Webhook Response different from Documentation

I'm currently using Dialogflow in combination with fulfillment/webhooks.
In the documentation of the fulfillments there is an example POST request for webhooks:
POST body:
{
"contexts": [
string
],
"lang": string,
"query": string,
"sessionId": string,
"timezone": string
}
The request that I'm receiving on my end is different from what is defined in the documentation. Has somebody an idea why?
This is what I receive:
{
"id": "GUID",
"timestamp": "2018-01-12T12:25:32.202Z",
"lang": "de",
"result": {
"source": "agent",
"resolvedQuery": "Test",
"speech": "",
"action": "",
"actionIncomplete": false,
"parameters": {
"Nummer": ""
},
"contexts": [],
"metadata": {
"intentId": "XYZ",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"intentName": "Intent"
},
"fulfillment": {
"speech": "",
"messages": [{
"type": 0,
"speech": ""
}]
},
"score": 0.6700000166893005
},
"status": {
"code": 200,
"errorType": "success",
"webhookTimedOut": false
},
"sessionId": "GUID"
}
I've found that different invocation sources send slightly different data to the web hook.
For example the Google Action simulator will send different information in the context reply than say the test pane in an intent.
Im guessing that the answer may lie in where/how your calling the web hook.

Resources