Skip to content
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

Merge main into live #3866

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/AutoLabelAssign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Assign and label PR

permissions:
pull-requests: write
contents: read
actions: read

on:
workflow_run:
workflows: [Background tasks]
types:
- completed

jobs:
download-payload:
name: Download and extract payload artifact
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-ExtractPayload.yml@workflows-prod
with:
WorkflowId: ${{ github.event.workflow_run.id }}
OrgRepo: ${{ github.repository }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}

label-assign:
name: Run assign and label
needs: [download-payload]
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelAssign.yml@workflows-prod
with:
PayloadJson: ${{ needs.download-payload.outputs.WorkflowPayload }}
AutoAssignUsers: 1
AutoLabel: 1
ExcludedUserList: '["user1", "user2"]'
ExcludedBranchList: '["branch1", "branch2"]'
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/AutoLabelMsftContributor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Auto label Microsoft contributors

permissions:
pull-requests: write
contents: read
actions: read

on:
workflow_run:
workflows: [Background tasks]
types:
- completed

jobs:
download-payload:
if: github.repository_visibility == 'public'
name: Download and extract payload artifact
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-ExtractPayload.yml@workflows-prod
with:
WorkflowId: ${{ github.event.workflow_run.id }}
OrgRepo: ${{ github.repository }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}

label-msft:
name: Label Microsoft contributors
if: github.repository_visibility == 'public'
needs: [download-payload]
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelMsftContributor.yml@workflows-prod
with:
PayloadJson: ${{ needs.download-payload.outputs.WorkflowPayload }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
TeamReadAccessToken: ${{ secrets.ORG_READTEAMS_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/BackgroundTasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Background tasks

permissions:
pull-requests: write
contents: read

on:
pull_request_target:

jobs:
upload:
runs-on: ubuntu-latest

steps:
- name: Save payload data
env:
PayloadJson: ${{ toJSON(github) }}
AccessToken: ${{ github.token }}
run: |
mkdir -p ./pr
echo $PayloadJson > ./pr/PayloadJson.json
sed -i -e "s/$AccessToken/XYZ/g" ./pr/PayloadJson.json
- uses: actions/upload-artifact@v4
with:
name: PayloadJson
path: pr/
19 changes: 19 additions & 0 deletions .github/workflows/LiveMergeCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR can merge into branch

permissions:
pull-requests: write
statuses: write
contents: read

on:
pull_request_target:
types: [opened, reopened, synchronize, edited]

jobs:

live-merge:
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-LiveMergeCheck.yml@workflows-prod
with:
PayloadJson: ${{ toJSON(github) }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/PrFileCount.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR file count less than limit

permissions:
pull-requests: write
statuses: write
contents: read

on:
pull_request_target:
types: [opened, reopened, synchronize, labeled, unlabeled, edited]

jobs:

file-count:
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-PrFileCount.yml@workflows-prod
with:
PayloadJson: ${{ toJSON(github) }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/ProtectedFiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: PR has no protected files

permissions:
pull-requests: write
statuses: write
contents: read

on: [pull_request_target]

jobs:

protected-files:
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-ProtectedFiles.yml@workflows-prod
with:
PayloadJson: ${{ toJSON(github) }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}