Skip to content

Commit b4da379

Browse files
Merge pull request #31566 from MicrosoftDocs/main
[AutoPublish] main to live - 04/19 00:30 PDT | 04/19 13:00 IST
2 parents 4098ab6 + 80f39bf commit b4da379

6 files changed

Lines changed: 111 additions & 19 deletions

File tree

.github/workflows/AutoIssueAssign.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: (Scheduled) Auto issue assign
22

33
permissions:
4+
contents: read
45
issues: write
56

67
on:
@@ -12,14 +13,29 @@ on:
1213

1314
jobs:
1415

16+
config:
17+
if: github.repository_owner == 'MicrosoftDocs'
18+
runs-on: ubuntu-latest
19+
outputs:
20+
ExcludedUserList: ${{ steps.read.outputs.ExcludedUserList }}
21+
steps:
22+
- uses: actions/checkout@v5
23+
with:
24+
sparse-checkout: .github/workflow-config.json
25+
sparse-checkout-cone-mode: false
26+
- id: read
27+
shell: pwsh
28+
run: |
29+
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).AutoIssueAssign
30+
"ExcludedUserList=$($Config.ExcludedUserList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT
31+
1532
stale-branch:
1633
if: github.repository_owner == 'MicrosoftDocs'
34+
needs: config
1735
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoIssueAssign.yml@workflows-prod
1836
with:
1937
PayloadJson: ${{ toJSON(github) }}
20-
ExcludedUserList: '["user1", "user2"]'
21-
22-
38+
ExcludedUserList: ${{ needs.config.outputs.ExcludedUserList }}
2339
secrets:
2440
AccessToken: ${{ secrets.GITHUB_TOKEN }}
2541
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}

.github/workflows/AutoLabelAssign.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@ on:
1212
- completed
1313

1414
jobs:
15+
config:
16+
if: github.repository_owner == 'MicrosoftDocs'
17+
runs-on: ubuntu-latest
18+
outputs:
19+
AutoAssignUsers: ${{ steps.read.outputs.AutoAssignUsers }}
20+
AutoAssignReviewers: ${{ steps.read.outputs.AutoAssignReviewers }}
21+
AutoLabel: ${{ steps.read.outputs.AutoLabel }}
22+
ExcludedUserList: ${{ steps.read.outputs.ExcludedUserList }}
23+
ExcludedBranchList: ${{ steps.read.outputs.ExcludedBranchList }}
24+
steps:
25+
- uses: actions/checkout@v5
26+
with:
27+
sparse-checkout: .github/workflow-config.json
28+
sparse-checkout-cone-mode: false
29+
- id: read
30+
shell: pwsh
31+
run: |
32+
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).AutoLabelAssign
33+
"AutoAssignUsers=$($Config.AutoAssignUsers)" >> $Env:GITHUB_OUTPUT
34+
"AutoAssignReviewers=$($Config.AutoAssignReviewers)" >> $Env:GITHUB_OUTPUT
35+
"AutoLabel=$($Config.AutoLabel)" >> $Env:GITHUB_OUTPUT
36+
"ExcludedUserList=$($Config.ExcludedUserList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT
37+
"ExcludedBranchList=$($Config.ExcludedBranchList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT
38+
1539
download-payload:
1640
name: Download and extract payload artifact
1741
if: github.repository_owner == 'MicrosoftDocs'
@@ -25,19 +49,18 @@ jobs:
2549
label-assign:
2650
name: Run assign and label
2751
if: github.repository_owner == 'MicrosoftDocs'
28-
needs: [download-payload]
52+
needs: [config, download-payload]
2953
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelAssign.yml@workflows-test
3054
with:
3155
PayloadJson: ${{ needs.download-payload.outputs.WorkflowPayload }}
32-
AutoAssignUsers: 1
33-
AutoAssignReviewers: 1
34-
AutoLabel: 1
35-
ExcludedUserList: '["user1", "user2"]'
36-
ExcludedBranchList: '["branch1", "branch2"]'
56+
AutoAssignUsers: ${{ fromJSON(needs.config.outputs.AutoAssignUsers) }}
57+
AutoAssignReviewers: ${{ fromJSON(needs.config.outputs.AutoAssignReviewers) }}
58+
AutoLabel: ${{ fromJSON(needs.config.outputs.AutoLabel) }}
59+
ExcludedUserList: ${{ needs.config.outputs.ExcludedUserList }}
60+
ExcludedBranchList: ${{ needs.config.outputs.ExcludedBranchList }}
3761
secrets:
3862
AccessToken: ${{ secrets.GITHUB_TOKEN }}
3963
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}
40-
4164
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}
4265

4366

.github/workflows/AutoPublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
EnableAutoPublish: ${{ steps.read.outputs.EnableAutoPublish }}
2222
EnableAutoMerge: ${{ steps.read.outputs.EnableAutoMerge }}
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525
with:
2626
sparse-checkout: .github/workflow-config.json
2727
sparse-checkout-cone-mode: false

.github/workflows/Stale.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: (Scheduled) Mark stale pull requests
22

33
permissions:
4+
contents: read
45
issues: write
56
pull-requests: write
67

@@ -10,11 +11,28 @@ on:
1011
workflow_dispatch:
1112

1213
jobs:
14+
config:
15+
if: github.repository_owner == 'MicrosoftDocs'
16+
runs-on: ubuntu-latest
17+
outputs:
18+
RunDebug: ${{ steps.read.outputs.RunDebug }}
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
sparse-checkout: .github/workflow-config.json
23+
sparse-checkout-cone-mode: false
24+
- id: read
25+
shell: pwsh
26+
run: |
27+
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).Stale
28+
"RunDebug=$("$($Config.RunDebug)".ToLower())" >> $Env:GITHUB_OUTPUT
29+
1330
stale:
1431
if: github.repository_owner == 'MicrosoftDocs'
32+
needs: config
1533
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-Stale.yml@workflows-prod
1634
with:
17-
RunDebug: false
35+
RunDebug: ${{ fromJSON(needs.config.outputs.RunDebug) }}
1836
RepoVisibility: ${{ github.repository_visibility }}
1937
secrets:
2038
AccessToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/StaleBranch.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,31 @@ on:
1818

1919
jobs:
2020

21+
config:
22+
if: github.repository_owner == 'MicrosoftDocs'
23+
runs-on: ubuntu-latest
24+
outputs:
25+
RepoBranchSkipList: ${{ steps.read.outputs.RepoBranchSkipList }}
26+
ReportOnly: ${{ steps.read.outputs.ReportOnly }}
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
sparse-checkout: .github/workflow-config.json
31+
sparse-checkout-cone-mode: false
32+
- id: read
33+
shell: pwsh
34+
run: |
35+
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).StaleBranch
36+
"RepoBranchSkipList=$($Config.RepoBranchSkipList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT
37+
"ReportOnly=$("$($Config.ReportOnly)".ToLower())" >> $Env:GITHUB_OUTPUT
38+
2139
stale-branch:
2240
if: github.repository_owner == 'MicrosoftDocs'
41+
needs: config
2342
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-StaleBranch.yml@workflows-prod
2443
with:
2544
PayloadJson: ${{ toJSON(github) }}
26-
RepoBranchSkipList: '[
27-
"ExampleBranch1",
28-
"ExampleBranch2"
29-
]'
30-
ReportOnly: false
45+
RepoBranchSkipList: ${{ needs.config.outputs.RepoBranchSkipList }}
46+
ReportOnly: ${{ fromJSON(needs.config.outputs.ReportOnly) }}
3147
secrets:
3248
AccessToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TierManagement.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,31 @@ on:
1313

1414
jobs:
1515

16+
config:
17+
if: github.repository_owner == 'MicrosoftDocs' && github.repository_visibility == 'private'
18+
runs-on: ubuntu-latest
19+
outputs:
20+
EnableWriteSignOff: ${{ steps.read.outputs.EnableWriteSignOff }}
21+
EnableReadOnlySignoff: ${{ steps.read.outputs.EnableReadOnlySignoff }}
22+
steps:
23+
- uses: actions/checkout@v5
24+
with:
25+
sparse-checkout: .github/workflow-config.json
26+
sparse-checkout-cone-mode: false
27+
- id: read
28+
shell: pwsh
29+
run: |
30+
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).TierManagement
31+
"EnableWriteSignOff=$($Config.EnableWriteSignOff)" >> $Env:GITHUB_OUTPUT
32+
"EnableReadOnlySignoff=$($Config.EnableReadOnlySignoff)" >> $Env:GITHUB_OUTPUT
33+
1634
tier-mgmt:
1735
if: github.repository_owner == 'MicrosoftDocs' && github.repository_visibility == 'private'
36+
needs: config
1837
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-TierManagement.yml@workflows-prod
1938
with:
2039
PayloadJson: ${{ toJSON(github) }}
21-
EnableWriteSignOff: 1
22-
EnableReadOnlySignoff: 1
40+
EnableWriteSignOff: ${{ fromJSON(needs.config.outputs.EnableWriteSignOff) }}
41+
EnableReadOnlySignoff: ${{ fromJSON(needs.config.outputs.EnableReadOnlySignoff) }}
2342
secrets:
2443
AccessToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)