Skip to content
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
25 changes: 21 additions & 4 deletions .github/workflows/AutoIssueAssign.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
name: (Scheduled) Auto issue assign

permissions:
contents: read
issues: write

on:
schedule:
- cron: "0 17 * * *"
- cron: "26 21 * * *"

workflow_dispatch:


jobs:

config:
if: github.repository_owner == 'MicrosoftDocs'
runs-on: ubuntu-latest
outputs:
ExcludedUserList: ${{ steps.read.outputs.ExcludedUserList }}
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: .github/workflow-config.json
sparse-checkout-cone-mode: false
- id: read
shell: pwsh
run: |
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).AutoIssueAssign
"ExcludedUserList=$($Config.ExcludedUserList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT

stale-branch:
if: github.repository_owner == 'MicrosoftDocs'
needs: config
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoIssueAssign.yml@workflows-prod
with:
PayloadJson: ${{ toJSON(github) }}
ExcludedUserList: '["user1", "user2"]'

ExcludedUserList: ${{ needs.config.outputs.ExcludedUserList }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}
20 changes: 19 additions & 1 deletion .github/workflows/Stale.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: (Scheduled) Mark stale pull requests

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

Expand All @@ -10,11 +11,28 @@ on:
workflow_dispatch:

jobs:
config:
if: github.repository_owner == 'MicrosoftDocs'
runs-on: ubuntu-latest
outputs:
RunDebug: ${{ steps.read.outputs.RunDebug }}
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: .github/workflow-config.json
sparse-checkout-cone-mode: false
- id: read
shell: pwsh
run: |
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).Stale
"RunDebug=$("$($Config.RunDebug)".ToLower())" >> $Env:GITHUB_OUTPUT

stale:
if: github.repository_owner == 'MicrosoftDocs'
needs: config
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-Stale.yml@workflows-prod
with:
RunDebug: false
RunDebug: ${{ fromJSON(needs.config.outputs.RunDebug) }}
RepoVisibility: ${{ github.repository_visibility }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
26 changes: 21 additions & 5 deletions .github/workflows/StaleBranch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,31 @@ on:

jobs:

config:
if: github.repository_owner == 'MicrosoftDocs'
runs-on: ubuntu-latest
outputs:
RepoBranchSkipList: ${{ steps.read.outputs.RepoBranchSkipList }}
ReportOnly: ${{ steps.read.outputs.ReportOnly }}
steps:
- uses: actions/checkout@v5
with:
sparse-checkout: .github/workflow-config.json
sparse-checkout-cone-mode: false
- id: read
shell: pwsh
run: |
$Config = (Get-Content '.github/workflow-config.json' | ConvertFrom-Json).StaleBranch
"RepoBranchSkipList=$($Config.RepoBranchSkipList | ConvertTo-Json -Compress)" >> $Env:GITHUB_OUTPUT
"ReportOnly=$("$($Config.ReportOnly)".ToLower())" >> $Env:GITHUB_OUTPUT

stale-branch:
if: github.repository_owner == 'MicrosoftDocs'
needs: config
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-StaleBranch.yml@workflows-prod
with:
PayloadJson: ${{ toJSON(github) }}
RepoBranchSkipList: '[
"ExampleBranch1",
"ExampleBranch2"
]'
ReportOnly: false
RepoBranchSkipList: ${{ needs.config.outputs.RepoBranchSkipList }}
ReportOnly: ${{ fromJSON(needs.config.outputs.ReportOnly) }}
secrets:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
Loading