Skip to content

Commit 7427d60

Browse files
authored
Merge pull request #13821 from MicrosoftDocs/workflows-test
Uncomment Invoke delete commands
2 parents e7ea62f + 169bff1 commit 7427d60

295 files changed

Lines changed: 11543 additions & 5340 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414

1515
auto-publish:
1616
if: github.repository_owner == 'MicrosoftDocs' && contains(github.event.repository.topics, 'build')
17-
uses: MicrosoftDocs/max-cpub-test/.github/workflows/Shared-Publish.yml@main
17+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoPublish.yml@workflows-prod
1818
with:
1919
PayloadJson: ${{ toJSON(github) }}
2020
EnableAutoPublish: true
2121

2222
secrets:
2323
AccessToken: ${{ secrets.GITHUB_TOKEN }}
2424
PrivateKey: ${{ secrets.M365_APP_PRIVATE_KEY }}
25-
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}
25+
ClientId: ${{ secrets.M365_APP_CLIENT_ID }}

.github/workflows/Shared-StaleBranch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
# If the workflow is in reporting mode, don't delete the branch. If it isn't, delete it.
356356
If (!$ReportOnly) {
357357
358-
#Invoke-RestMethod -Headers $GitHubHeaders -Uri $BranchDeleteUrl -Method DELETE -ResponseHeadersVariable ResponseHeaders | Out-Null
358+
Invoke-RestMethod -Headers $GitHubHeaders -Uri $BranchDeleteUrl -Method DELETE -ResponseHeadersVariable ResponseHeaders | Out-Null
359359
360360
}
361361
@@ -387,7 +387,7 @@ jobs:
387387
# If the workflow is in reporting mode, don't delete the branch. If it isn't, delete it.
388388
If (!$ReportOnly) {
389389
390-
#Invoke-RestMethod -Headers $GitHubHeaders -Uri $BranchDeleteUrl -Method DELETE -ResponseHeadersVariable ResponseHeaders | Out-Null
390+
Invoke-RestMethod -Headers $GitHubHeaders -Uri $BranchDeleteUrl -Method DELETE -ResponseHeadersVariable ResponseHeaders | Out-Null
391391
392392
}
393393

.github/workflows/StaleBranch.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: (Scheduled) Stale branch removal
22

33
permissions:
44
contents: write
5-
5+
6+
# This workflow is designed to be run in the days up to, and including, a "deletion day", specified by 'DeleteOnDayOfMonth' in env: in https://github.com/MicrosoftDocs/microsoft-365-docs/blob/workflows-prod/.github/workflows/Shared-StaleBranch.yml.
7+
# On the days leading up to "deletion day", the workflow will report the branches to be deleted. This lets users see which branches will be deleted. On "deletion day", those branches are deleted.
8+
# The workflow should not be configured to run after "deletion day" so that users can review the branches were deleted.
9+
# Recommendation: configure cron to run on days 1,15-31 where 1 is what's configured in 'DeleteOnDayOfMonth'. If 'DeleteOnDayOfMonth' is set to something else, update cron to run the two weeks leading up to it.
10+
611
on:
712
schedule:
8-
- cron: "0 9 1 * *"
13+
- cron: "0 9 1,15-31 * *"
914

10-
# workflow_dispatch:
15+
workflow_dispatch:
1116

1217

1318
jobs:

0 commit comments

Comments
 (0)