Skip to content

Commit 7cb326c

Browse files
committed
Merge branch 'main' into release/latest
2 parents 52b118c + a8902ac commit 7cb326c

File tree

35 files changed

+161
-117
lines changed

35 files changed

+161
-117
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @microsoftgraph/microsoft-graph-toolkit-write
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
name: branch_protection_sdks
5+
description: Organization branch protection policy for Microsoft Graph Toolkit repository
6+
resource: repository
7+
configuration:
8+
branchProtectionRules:
9+
- branchNamePattern: next/*
10+
requiredApprovingReviewsCount:
11+
min: 1
12+
# Must have a CODEOWNER approve for the PR to be merged.
13+
requireCodeOwnersReview: true
14+
15+
# Dismiss stale pull request approvals when new commits are pushed
16+
dismissStaleReviews: true
17+
18+
# Require conversation resolution before merging. Address all concerns, and resolve in the GitHub PR UI.
19+
requiresConversationResolution: true
20+
21+
# Require status checks to pass before merging. TODO: this value should be true, we should work to support this.
22+
# Used with the requiredStatusChecks setting to specify which checks must pass for the PR to be merged.
23+
requiresStrictStatusChecks: true
24+
25+
requiredStatusChecks:
26+
- GitOps/AdvancedSecurity
27+
- license/cla
28+
- check-build-matrix
29+
30+
# TODO: all commits should be signed. We need to get everyone signing their commits.
31+
requiresCommitSignatures: false

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ main, release/* ]
16+
branches: [main, release/*, next/fluentui, next/mgt-chat]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main, release/* ]
19+
branches: [main, release/*, next/fluentui, next/mgt-chat]
2020
schedule:
2121
- cron: '29 20 * * 1'
2222

@@ -28,40 +28,40 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
language: [ 'javascript' ]
31+
language: ['javascript']
3232
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3333
# Learn more:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3535

3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
3939

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
43-
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v2
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4949

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v2
5454

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
5757

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
6161

62-
#- run: |
63-
# make bootstrap
64-
# make release
62+
#- run: |
63+
# make bootstrap
64+
# make release
6565

66-
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

.github/workflows/pr.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,17 @@ jobs:
3939
with:
4040
name: bundle
4141
path: packages/mgt/dist/bundle
42+
43+
# The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
44+
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
45+
check-build-matrix:
46+
runs-on: ubuntu-latest
47+
needs: build
48+
if: always()
49+
steps:
50+
- name: All build matrix options are successful
51+
if: ${{ !(contains(needs.*.result, 'failure')) }}
52+
run: exit 0
53+
- name: One or more build matrix options failed
54+
if: ${{ contains(needs.*.result, 'failure') }}
55+
run: exit 1

.storybook/addons/signInAddon/signInAddon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import addons, { makeDecorator } from '@storybook/addons';
22
import { Providers } from '../../../packages/mgt-element/dist/es6/providers/Providers';
33
import { ProviderState } from '../../../packages/mgt-element/dist/es6/providers/IProvider';
4-
import { MsalProvider } from '../../../packages/providers/mgt-msal-provider/dist/es6/MsalProvider';
4+
import { Msal2Provider } from '../../../packages/providers/mgt-msal2-provider/dist/es6/Msal2Provider';
55
import { MockProvider } from '../../../packages/mgt-element/dist/es6/mock/MockProvider';
66
import { CLIENTID, SETPROVIDER_EVENT, GETPROVIDER_EVENT } from '../../env';
77

@@ -22,7 +22,7 @@ export const withSignIn = makeDecorator({
2222
if (_allow_signin) {
2323
const currentProvider = Providers.globalProvider;
2424
if (params.state === ProviderState.SignedIn && (!currentProvider || currentProvider === mockProvider)) {
25-
Providers.globalProvider = new MsalProvider({
25+
Providers.globalProvider = new Msal2Provider({
2626
clientId: CLIENTID
2727
});
2828
} else if (params.state !== ProviderState.SignedIn && currentProvider !== mockProvider) {

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

artifacts/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ function Get-Packages {
2020
Write-Output $output
2121
}
2222

23-
$packages = Get-Packages mgt-element mgt-msal-provider mgt-proxy-provider mgt-sharepoint-provider mgt-teams-provider mgt-components mgt mgt-react
23+
$packages = Get-Packages mgt-element mgt-msal2-provider mgt-proxy-provider mgt-sharepoint-provider mgt-teamsfx-provider mgt-components mgt mgt-react
2424

2525
npm i $packages

auth.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<html>
22
<head>
33
<script src="https://unpkg.com/@microsoft/teams-js@2/dist/MicrosoftTeams.min.js" crossorigin="anonymous"></script>
4-
<!-- <script src="./packages/mgt/dist/bundle/mgt-loader.js"></script>
5-
<script>
6-
mgt.TeamsProvider.handleAuth();
7-
</script> -->
84
<script type="module">
9-
// import { TeamsProvider } from './packages/providers/mgt-teams-provider/dist/es6/TeamsProvider.js';
10-
// TeamsProvider.handleAuth();
11-
12-
import { TeamsMsal2Provider } from './packages/providers/mgt-teams-msal2-provider/dist/es6/TeamsMsal2Provider.js';
13-
TeamsMsal2Provider.handleAuth();
5+
import { TeamsFxProvider } from './packages/providers/mgt-teamsfx-provider/dist/es6/TeamsFxProvider.js';
6+
// TODO: show how to use TeamsFx in auth.
147
</script>
158
</head>
169
<body>

index.html

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@
1717
</head>
1818

1919
<body>
20-
<!-- <mgt-teams-provider
21-
client-id="a974dfa0-9f57-49b9-95db-90f04ce2111a"
22-
auth-popup-url="auth.html"
23-
></mgt-teams-provider> -->
24-
25-
<!-- <mgt-teams-msal2-provider
26-
client-id="72482bff-ecae-44f5-8fdc-513b7f5602e7"
27-
scopes="user.read,user.read.all,mail.readBasic,people.read,people.read.all,sites.read.all,user.readbasic.all,contacts.read,presence.read,presence.read.all,tasks.readwrite,tasks.read,calendars.read,group.read.all"
28-
auth-popup-url="auth.html"
29-
></mgt-teams-msal2-provider> -->
30-
31-
<!-- Teams Msal2 provider in SSO mode (see "teams-sso-node" sample) -->
32-
<!-- <mgt-teams-msal2-provider
33-
client-id="72482bff-ecae-44f5-8fdc-513b7f5602e7"
34-
scopes="user.read,user.read.all,mail.readBasic,people.read,people.read.all,sites.read.all,user.readbasic.all,contacts.read,presence.read,presence.read.all,tasks.readwrite,tasks.read,calendars.read,group.read.all"
35-
auth-popup-url="auth.html"
36-
sso-url="http://localhost:5000/api/token"
37-
http-method="POST"
38-
></mgt-teams-msal2-provider> -->
39-
40-
<!-- <mgt-msal-provider
41-
client-id="a974dfa0-9f57-49b9-95db-90f04ce2111a"
42-
scopes="user.read,user.read.all,mail.readBasic,people.read,people.read.all,sites.read.all,user.readbasic.all,contacts.read,presence.read,presence.read.all,tasks.readwrite,tasks.read,calendars.read,group.read.all"
43-
redirect-uri="http://localhost:3000"
44-
depends-on="mgt-teams-provider"
45-
></mgt-msal-provider> -->
46-
4720
<!-- <mgt-msal2-provider
4821
client-id="2dfea037-938a-4ed8-9b35-c05708a1b241"
4922
redirect-uri="http://localhost:3000"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "root",
33
"private": true,
4-
"version": "2.10.1",
4+
"version": "2.11.0",
55
"workspaces": [
66
"packages/*",
77
"packages/providers/*",

0 commit comments

Comments
 (0)