-
Notifications
You must be signed in to change notification settings - Fork 2
feat: adding the new ReceiveServiceNowMessage function #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SamRobinson75684
merged 29 commits into
main
from
feat/DTOSS-7351-adding-new-ReceiveServiceNowMessage-function
Mar 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
906a987
feat: adidng the new ReceiveServiceNowMessage fucnton
SamRobinson75684 dd0db24
chore: namespace change
SamRobinson75684 596e442
chore: removing commented out code
SamRobinson75684 00b5ed7
chore: trying to get code to build in git pipeline
SamRobinson75684 779ca38
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 076af17
chore: removing unneeded .vscode folder
SamRobinson75684 13cb4a3
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 9ab8e71
chore: adding docker details for new function
SamRobinson75684 7c22f9f
feat: DTOSS-7351 infra setup for ServiceNow function app
MacMur85 692f6e6
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 b0a59f7
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 a395f00
chnaging CohortDistributionDataServiceURL port number to be correct
SamRobinson75684 4fe0c8a
chore: adding line space to line 434 in compose.core.yaml
SamRobinson75684 e7f399e
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 edefe5c
chore: linting in the compose core yaml
SamRobinson75684 2a10bf3
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 7550c6a
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 70d4846
fix: fixng docker file
SamRobinson75684 bda4e36
fix: fixng docker file
SamRobinson75684 a69691b
tring to get function to build
SamRobinson75684 d52a860
fix: trying to fix docker file
SamRobinson75684 f39f1db
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 5c70525
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 4d3be45
fix: fixing unit tests after merge
SamRobinson75684 53b721f
chore: addresing comments
SamRobinson75684 177285e
chore: addresing comments
SamRobinson75684 e26e05b
chore: addresing comments
SamRobinson75684 ea781e2
chore: addressing comments
SamRobinson75684 bdc1acc
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
application/CohortManager/src/Functions/ServiceNowIntegrationService/.vscode/extensions.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "recommendations": [ | ||
| "ms-azuretools.vscode-azurefunctions" | ||
| ] | ||
| } |
14 changes: 14 additions & 0 deletions
14
application/CohortManager/src/Functions/ServiceNowIntegrationService/Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| using Common; | ||
| using Microsoft.Azure.Functions.Worker.Builder; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Hosting; | ||
|
|
||
| var host = new HostBuilder() | ||
| .ConfigureFunctionsWebApplication() | ||
| .ConfigureServices(services => | ||
| { | ||
| services.AddSingleton<ICreateResponse, CreateResponse>(); | ||
| }) | ||
| .Build(); | ||
|
|
||
| await host.RunAsync(); |
9 changes: 9 additions & 0 deletions
9
...n/CohortManager/src/Functions/ServiceNowIntegrationService/Properties/launchSettings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "profiles": { | ||
| "ReceiveServiceNowMessage": { | ||
| "commandName": "Project", | ||
| "commandLineArgs": "--port 7093", | ||
| "launchBrowser": false | ||
| } | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
...tion/CohortManager/src/Functions/ServiceNowIntegrationService/ReceiveServiceNowMessage.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| namespace ServiceNowIntegrationService; | ||
|
SamRobinson75684 marked this conversation as resolved.
Outdated
|
||
|
|
||
| using Microsoft.Azure.Functions.Worker; | ||
| using Microsoft.Extensions.Logging; | ||
| using Common; | ||
| using Microsoft.Azure.Functions.Worker.Http; | ||
| using System.Net; | ||
|
|
||
| public class ReceiveServiceNowMessage | ||
| { | ||
| private readonly ILogger<ReceiveServiceNowMessage> _logger; | ||
|
|
||
| private readonly ICreateResponse _createResponse; | ||
|
|
||
|
|
||
| public ReceiveServiceNowMessage(ILogger<ReceiveServiceNowMessage> logger, ICreateResponse createResponse) | ||
| { | ||
| _logger = logger; | ||
| _createResponse = createResponse; | ||
| } | ||
|
|
||
| [Function("ReceiveServiceNowMessage")] | ||
| public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req) | ||
| { | ||
| _logger.LogInformation("ReceiveServiceNowMessage function processed a request."); | ||
| return _createResponse.CreateHttpResponse(HttpStatusCode.OK, req); | ||
| } | ||
| } | ||
|
|
||
36 changes: 36 additions & 0 deletions
36
.../CohortManager/src/Functions/ServiceNowIntegrationService/ReceiveServiceNowMessage.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <AzureFunctionsVersion>v4</AzureFunctionsVersion> | ||
| <OutputType>Exe</OutputType> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
| <!-- Application Insights isn't enabled by default. See https://aka.ms/AAt8mw4. --> | ||
| <!-- <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" /> --> | ||
| <!-- <PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" /> --> | ||
| <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" /> | ||
| <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" /> | ||
| <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" /> | ||
| <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Update="host.json"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="local.settings.json"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| <CopyToPublishDirectory>Never</CopyToPublishDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\Shared\Common\Common.csproj" /> | ||
| <ProjectReference Include="..\Shared\Data\Data.csproj" /> | ||
| <ProjectReference Include="..\Shared\Model\Model.csproj" /> | ||
| </ItemGroup> | ||
| </Project> |
12 changes: 12 additions & 0 deletions
12
application/CohortManager/src/Functions/ServiceNowIntegrationService/host.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "version": "2.0", | ||
| "logging": { | ||
| "applicationInsights": { | ||
| "samplingSettings": { | ||
| "isEnabled": true, | ||
| "excludedTypes": "Request" | ||
| }, | ||
| "enableLiveMetricsFilters": true | ||
| } | ||
| } | ||
| } |
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.