Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit 776074b

Browse files
authored
Merge pull request #869 from microsoftgraph/dev
Merges dev into master
2 parents 1878dd1 + a48faee commit 776074b

File tree

10 files changed

+16886
-27872
lines changed

10 files changed

+16886
-27872
lines changed

SamplesDashboard/SamplesDashboard/ClientApp/package-lock.json

Lines changed: 16828 additions & 27797 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SamplesDashboard/SamplesDashboard/ClientApp/package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@azure/msal-browser": "^2.22.1",
7-
"@azure/msal-react": "^1.3.1",
8-
"@fluentui/react": "^8.63.1",
9-
"@microsoft/microsoft-graph-client": "^3.0.2",
10-
"bootstrap": "^5.1.3",
11-
"react": "^17.0.2",
12-
"react-bootstrap": "^2.2.2",
13-
"react-dom": "^17.0.2",
14-
"react-router-dom": "^5.3.0",
15-
"typescript": "^4.6.3",
16-
"web-vitals": "^2.1.4"
6+
"@azure/msal-browser": "2.30.0",
7+
"@azure/msal-react": "1.4.9",
8+
"@fluentui/react": "8.98.0",
9+
"@microsoft/microsoft-graph-client": "3.0.2",
10+
"bootstrap": "5.2.2",
11+
"react": "17.0.2",
12+
"react-bootstrap": "2.5.0",
13+
"react-dom": "17.0.2",
14+
"react-router-dom": "5.3.4",
15+
"typescript": "4.8.4",
16+
"web-vitals": "3.0.3"
1717
},
1818
"devDependencies": {
19-
"@testing-library/jest-dom": "^5.16.3",
20-
"@testing-library/react": "^12.1.4",
21-
"@testing-library/user-event": "^14.0.4",
22-
"@types/jest": "^27.4.1",
23-
"@types/microsoft-graph": "^2.13.0",
24-
"@types/node": "^17.0.23",
25-
"@types/react": "^17.0.43",
26-
"@types/react-dom": "^17.0.14",
27-
"@types/react-router-dom": "^5.3.3",
28-
"prettier": "^2.6.2",
29-
"react-scripts": "4.0.3"
19+
"@testing-library/jest-dom": "5.16.5",
20+
"@testing-library/react": "12.1.5",
21+
"@testing-library/user-event": "14.4.3",
22+
"@types/jest": "29.1.2",
23+
"@types/microsoft-graph": "2.24.0",
24+
"@types/node": "18.8.4",
25+
"@types/react": "17.0.50",
26+
"@types/react-dom": "17.0.14",
27+
"@types/react-router-dom": "5.3.3",
28+
"prettier": "2.7.1",
29+
"react-scripts": "5.0.1"
3030
},
3131
"scripts": {
3232
"start": "react-scripts start",

SamplesDashboard/SamplesDashboard/ClientApp/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const darkTheme = createTheme({
4545
});
4646

4747
type AppProps = {
48-
pca: IPublicClientApplication;
48+
pca?: IPublicClientApplication;
4949
};
5050

5151
interface ThemedAppProps {
@@ -66,7 +66,7 @@ function ThemedApp({ children }: ThemedAppProps) {
6666

6767
function App({ pca }: AppProps) {
6868
return (
69-
<MsalProvider instance={pca}>
69+
<MsalProvider instance={pca!}>
7070
<ProvideAppContext>
7171
<ThemedApp>
7272
<Router>

SamplesDashboard/SamplesDashboard/MessageHandlers/GitHubAuthHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ CancellationToken cancellationToken
3434
{
3535
var token = await _gitHubAuthService.GetGitHubAppToken();
3636
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", token);
37+
requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.github.hawkgirl-preview+json"));
3738
return await base.SendAsync(requestMessage, cancellationToken);
3839
}
3940
}

SamplesDashboard/SamplesDashboard/SamplesDashboard.csproj

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="AngleSharp" Version="0.16.1" />
14-
<PackageReference Include="Azure.Identity" Version="1.5.0" />
15-
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.3.0" />
16-
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.3.0" />
17-
<PackageReference Include="GraphQL.Client" Version="4.0.2" />
18-
<PackageReference Include="GraphQL.Client.Serializer.SystemTextJson" Version="4.0.2" />
19-
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.15" />
20-
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.3" />
21-
<PackageReference Include="Microsoft.Identity.Web" Version="1.23.1" />
22-
<PackageReference Include="Microsoft.IdentityModel.KeyVaultExtensions" Version="6.16.0" />
23-
<PackageReference Include="NuGet.Protocol" Version="6.1.0" />
24-
<PackageReference Include="Octokit" Version="0.50.0" />
25-
<PackageReference Include="Semver" Version="2.1.0" />
26-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
27-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.16.0" />
28-
<PackageReference Include="YamlDotNet" Version="11.2.1" />
13+
<PackageReference Include="AngleSharp" Version="0.17.1" />
14+
<PackageReference Include="Azure.Identity" Version="1.7.0" />
15+
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.4.0" />
16+
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.4.0" />
17+
<PackageReference Include="GraphQL.Client" Version="5.1.0" />
18+
<PackageReference Include="GraphQL.Client.Serializer.SystemTextJson" Version="5.1.0" />
19+
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.17" />
20+
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.9" />
21+
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.3" />
22+
<PackageReference Include="Microsoft.IdentityModel.KeyVaultExtensions" Version="6.23.1" />
23+
<PackageReference Include="NuGet.Protocol" Version="6.3.1" />
24+
<PackageReference Include="Octokit" Version="3.0.1" />
25+
<PackageReference Include="Semver" Version="2.2.0" />
26+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
27+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.23.1" />
28+
<PackageReference Include="YamlDotNet" Version="12.0.2" />
2929
</ItemGroup>
3030

3131
<ItemGroup>

SamplesDashboard/SamplesDashboard/Services/RepositoriesService.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ internal async Task GetDependencyDataAsync(
402402
.BuildDependencyManifestFromFile(
403403
repository.Name, repository.DefaultBranch, yamlHeader.DependencyFile);
404404

405-
data.DependencyManifests.Values.Add(manifest);
405+
if (manifest != null)
406+
{
407+
data.DependencyManifests.Values.Add(manifest);
408+
}
406409
}
407410

408411
var dependencyList = new List<Dependency>();

SamplesDashboard/SamplesDashboard/Startup.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ public void ConfigureServices(IServiceCollection services)
4949
// Add a GraphQL client
5050
services
5151
.AddHttpClient<GraphQLHttpClient>(cli => {
52-
// Enable dependency graph info in GraphQL queries
53-
// https://docs.github.com/en/graphql/overview/schema-previews#access-to-a-repositories-dependency-graph-preview
54-
cli.DefaultRequestHeaders.Accept.Add(
55-
new MediaTypeWithQualityHeaderValue("application/vnd.github.hawkgirl-preview+json")
56-
);
5752
// Include user agent info
5853
cli.DefaultRequestHeaders.UserAgent.Add(
5954
new ProductInfoHeaderValue(Configuration.GetValue<string>("Product"),

SamplesDashboard/SamplesDashboardTests/RepositoriesServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public async Task ShouldGetGradleDependencies()
307307

308308
var yamlHeader = new YamlHeader
309309
{
310-
DependencyFile = "/demo/graphtutorial/build.gradle"
310+
DependencyFile = "/demo/graphtutorial/app/build.gradle"
311311
};
312312

313313
var data = new GitHubGraphQLRepoData

pipelines/release.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ steps:
2525
packageType: sdk
2626
version: 5.x
2727

28-
- task: UseNode@1
28+
- task: NodeTool@0
2929
inputs:
30-
checkLatest: true
30+
versionSpec: '16.x'
31+
displayName: 'Setup Node'
3132

3233
- task: DotNetCoreCLI@2
3334
displayName: "Restore Packages"
@@ -73,7 +74,8 @@ steps:
7374
env:
7475
AZURECLIENTID: $(AzureClientId)
7576
AZURECLIENTSECRET: $(AzureClientSecret)
76-
KEYIDENTIFIER: $(KeyIdentifier)
77+
GITHUBAPPKEYIDENTIFIER: $(GitHubAppKeyIdentifier)
78+
GITHUBAPPID: $(GitHubAppId)
7779
TENANTID: $(TenantId)
7880
MSOSCLIENTSECRET: $(MSOClientSecret_Value)
7981
KEYVAULTSECRET: $(KeyVaultSecret_Value)
@@ -100,14 +102,4 @@ steps:
100102
REACT_APP_CLIENT_ID: $(REACT_APP_CLIENT_ID)
101103
REACT_APP_TENANT_ID: $(REACT_APP_TENANT_ID)
102104

103-
- task: PublishBuildArtifacts@1
104-
105-
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
106-
displayName: 'Graph Client Tooling pipeline fail notification'
107-
inputs:
108-
addressType: serviceEndpoint
109-
serviceEndpointName: 'microsoftgraph pipeline status'
110-
title: '$(Build.DefinitionName) failure notification'
111-
text: 'This pipeline has failed. View the build details for further information. This is a blocking failure. '
112-
condition: failed()
113-
enabled: false
105+
- task: PublishBuildArtifacts@1

pipelines/validatePR.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ steps:
2222
packageType: sdk
2323
version: 5.x
2424

25-
- task: UseNode@1
25+
- task: NodeTool@0
2626
inputs:
27-
checkLatest: true
27+
versionSpec: '16.x'
28+
displayName: 'Setup Node'
2829

2930
- task: DotNetCoreCLI@2
3031
displayName: "Restore Packages"
@@ -70,7 +71,8 @@ steps:
7071
env:
7172
AZURECLIENTID: $(AzureClientId)
7273
AZURECLIENTSECRET: $(AzureClientSecret)
73-
KEYIDENTIFIER: $(KeyIdentifier)
74+
GITHUBAPPKEYIDENTIFIER: $(GitHubAppKeyIdentifier)
75+
GITHUBAPPID: $(GitHubAppId)
7476
TENANTID: $(TenantId)
7577
MSOSCLIENTSECRET: $(MSOClientSecret_Value)
7678
KEYVAULTSECRET: $(KeyVaultSecret_Value)
@@ -83,14 +85,4 @@ steps:
8385
condition: succeededOrFailed()
8486
inputs:
8587
testRunner: VSTest
86-
testResultsFiles: '**/*.trx'
87-
88-
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
89-
displayName: 'Graph Client Tooling pipeline fail notification'
90-
inputs:
91-
addressType: serviceEndpoint
92-
serviceEndpointName: 'microsoftgraph pipeline status'
93-
title: '$(Build.DefinitionName) failure notification'
94-
text: 'This pipeline has failed. View the build details for further information. This is a blocking failure. '
95-
condition: failed()
96-
enabled: false
88+
testResultsFiles: '**/*.trx'

0 commit comments

Comments
 (0)