Skip to content

Conversation

@numpie
Copy link
Collaborator

@numpie numpie commented Jul 3, 2020

No description provided.

@numpie numpie requested a review from ashishonce July 3, 2020 05:49
var queryParams = System.Web.HttpUtility.ParseQueryString(req.RequestUri.Query);
string repo_name = queryParams.Get("repoName");

if(repo_name!="")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use IsNullOrEmpty()

if(repo_name!="")
{
log.LogInformation("fetching repo name from query parameters."+repo_name);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs else condition

// var repo_name = Environment.GetEnvironmentVariable("REPO_NAME", EnvironmentVariableTarget.Process);
var repo_name = "";

if(requestObject[0]["data"]["runTags"]==null || requestObject[0]["data"]["runTags"]["githuB_REPOSITORY"]==null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now you don't need it from runTags I guess

event_source = event_data[1];

if(event_source == "MachineLearningServices"){
ParseMachineLearningEvent(requestObject);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this returns something.. let's use it


var payload = Newtonsoft.Json.JsonConvert.SerializeObject(new Newtonsoft.Json.Linq.JObject { ["event_type"] = event_types, ["client_payload"] = client_payload });
var client_payload = new Newtonsoft.Json.Linq.JObject { ["unit "] = false, ["integration"] = true,
["data"] = requestObject[0]["data"], ["event_source"] = event_source};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the Parsed value from Parser function

return requestObject[0]["data"];
}

[FunctionName("generic_triggers")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change will also require a change in the ARM templates... we might want to think about that

@numpie numpie requested a review from narula0781 July 3, 2020 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants