Skip to content

Commit

Permalink
Merge pull request #3026 from microsoftgraph/merge/main-to-chat
Browse files Browse the repository at this point in the history
chore: merge v4 to mgt-chat
  • Loading branch information
gavinbarron authored Feb 7, 2024
2 parents 4a285e1 + 288dbf9 commit 188b1cb
Show file tree
Hide file tree
Showing 2,155 changed files with 14,147 additions and 21,380 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
'packages/mgt-chat/tsconfig.json',
'packages/mgt-components/tsconfig.json',
'packages/mgt-react/tsconfig.json',
'packages/mgt-spfx/tsconfig.json',
'packages/mgt-spfx-utils/tsconfig.json',
'packages/providers/mgt-electron-provider/tsconfig.authenticator.json',
'packages/providers/mgt-electron-provider/tsconfig.provider.json',
Expand All @@ -39,7 +38,7 @@ module.exports = {
'react-hooks'
],
root: true,
ignorePatterns: ['**/**-css.ts', '.eslintrc.js', '*.cjs'],
ignorePatterns: ['**/**-css.ts', '.eslintrc.js', '*.cjs', 'rollup.config.mjs'],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
// prefer-nullish-coalescing requires strictNullChecking to be turned on
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/new-release--internal-use-only-.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ This issue tracks the publishing progress for a release. It will get updated as
- [ ] Validate npm packages are published
- [ ] Validate mgt.dev is updated
- [ ] Validate https://aka.ms/ge and https://aka.ms/mgt/docs are embedding the latest documentation
- [ ] Validate GitHub release contains `mgt-spfx` asset
- [ ] Publish GitHub release
- [ ] Close the current milestone
- [ ] Increment `./package.json` version in main for building preview packages
7 changes: 1 addition & 6 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -39,8 +39,3 @@ jobs:
if: github.repository == 'microsoftgraph/microsoft-graph-toolkit'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload a Build Artifact - mgt-spfx Solution
uses: actions/upload-artifact@v2
with:
name: mgt-spfx solution
path: packages/mgt-spfx/sharepoint/*
43 changes: 17 additions & 26 deletions .github/workflows/pr-clean-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ on:
types: [closed]
branches: [main, release/**, next/**]

permissions:
pull-requests: write
contents: write

jobs:
storybook:
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')"
cleanup:
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook') || contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,33 +30,20 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: |
- name: Setup git user
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Remove pr storybook deployment
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')"
run: |
git rm -r next/pr/${{ github.event.number }}
git commit -m "PR ${{ github.event.number }} closed - remove storybook"
git push
react-contoso:
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Remove pr test app deployment
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
run: |
git rm -r next/sample/pr/${{ github.event.number }}
git commit -m "PR ${{ github.event.number }} closed - remove react-contoso"
- name: Push changes
run: |
git push
7 changes: 7 additions & 0 deletions .github/workflows/pr-reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ on:
types:
- completed

permissions:
pull-requests: write
contents: read
id-token: write
checks: write

jobs:
pr_report:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}

steps:
# added to work around missing .git repo wanted by gh cli
- uses: actions/checkout@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ on:
types: [opened, labeled, synchronize, reopened]
branches: [main, release/**, next/**]

permissions:
pull-requests: write
contents: write

jobs:
storybook:
if: "contains(github.event.pull_request.labels.*.name, 'Build: Storybook')"
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr-test-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
types: [opened, labeled, synchronize, reopened]
branches: [main, release/**, next/**]

permissions:
pull-requests: write
contents: write

jobs:
react-contoso:
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
Expand All @@ -18,7 +22,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ on:
pull_request:
branches: [main, release/**, next/**]

permissions:
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
types:
- opened

permissions:
issues: write
repository-projects: read

jobs:
track_issue:
runs-on: ubuntu-latest

steps:
- name: Get project data
env:
Expand All @@ -32,8 +37,8 @@ jobs:
}' -f org=$PROJECT_ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to project
- name: Add issue to project
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_ACCESS_TOKEN }}
ISSUE_ID: ${{ github.event.issue.node_id }}
Expand All @@ -43,4 +48,4 @@ jobs:
addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
projectNextItem { id }
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID
13 changes: 7 additions & 6 deletions .github/workflows/push-preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
name: Create Preview release
on:
push:
tags: ['v3.*-preview.*', 'v3.*-rc.*']
tags: ['*-preview.*', '*-rc.*']

permissions:
contents: write
pull-requests: write

jobs:
version:
Expand All @@ -19,7 +23,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -44,7 +48,7 @@ jobs:
if: needs.version.outputs.latest-version != needs.version.outputs.package-version
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

environment:
name: release
Expand Down Expand Up @@ -74,9 +78,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Attach mgt-spfx solution to GitHub release
run: node scripts/uploadSpfxSolution.js ${{secrets.GITHUB_TOKEN}} ${{needs.version.outputs.package-version}}

- name: ReleaseNotes
uses: anton-yurchenko/git-release@v5.0
env:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ name: Release latest

on:
push:
tags: ['v3.*']
tags: ['v3.*', v4.*]
permissions:
contents: write

jobs:
version:
Expand All @@ -17,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -42,7 +44,7 @@ jobs:
if: needs.version.outputs.latest-version != needs.version.outputs.package-version
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

environment:
name: release
Expand Down Expand Up @@ -72,9 +74,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Attach mgt-spfx solution to GitHub release
run: node scripts/uploadSpfxSolution.js ${{secrets.GITHUB_TOKEN}} ${{needs.version.outputs.package-version}}

- name: Notify TeamsFx Repo
uses: peter-evans/repository-dispatch@v2
with:
Expand All @@ -88,7 +87,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: github.repository == 'microsoftgraph/microsoft-graph-toolkit'
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -40,9 +40,3 @@ jobs:
run: lerna exec --scope @microsoft/* -- "npm publish --tag next --access=public"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Upload a Build Artifact - mgt-spfx Solution
uses: actions/upload-artifact@v2
with:
name: mgt-spfx solution
path: packages/mgt-spfx/sharepoint/*
7 changes: 3 additions & 4 deletions .github/workflows/run-release-please.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# when the main branch is updated this workflow will run and create or update a combined [release PR](https://github.com/googleapis/release-please#whats-a-release-pr)
# upon approval of the release PR as it adds a v3.x tag the [push-release.yml](./push-release.yml) workflow will run, push the release to npm and update the GitHub
# release with the mgt-spfx sppkg file
# upon approval of the release PR as it adds a v3.x tag the [push-release.yml](./push-release.yml) workflow will run, push the release to npm
on:
push:
branches:
Expand All @@ -14,10 +13,10 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- uses: google-github-actions/release-please-action@v3
id: release
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ on:
push:
branches: [main]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'microsoftgraph/microsoft-graph-toolkit'

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.1.3"
".": "4.0.0"
}
Loading

0 comments on commit 188b1cb

Please sign in to comment.