Skip to content

Commit 5bb372f

Browse files
authored
Merge pull request #2 from iscai-msft/update_my_main
2 parents 08b2b11 + 6d1ad1b commit 5bb372f

File tree

29,540 files changed

+6278780
-2314434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

29,540 files changed

+6278780
-2314434
lines changed

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ exclude_lines =
2323
omit =
2424
*/test*
2525
env*
26-
*/_serialization.py
26+
*/_serialization.py
27+
*/sms/_shared/*

.devcontainer/devcontainer.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,11 @@
1313
"go.gopath": "/go",
1414
"go.goroot": "/usr/local/go",
1515
"go.toolsGopath": "/go/bin",
16-
"python.pythonPath": "/opt/python/latest/bin/python",
17-
"python.linting.enabled": true,
18-
"python.linting.pylintEnabled": true,
19-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
20-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
21-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
22-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
23-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
24-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
25-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
26-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
27-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
16+
"python.defaultInterpreterPath": "/opt/python/latest/bin/python",
2817
"lldb.executable": "/usr/bin/lldb",
2918
"files.watcherExclude": {
3019
"**/target/**": true
31-
}
20+
}
3221
},
3322
"remoteUser": "codespace",
3423
"overrideCommand": false,

.github/CODEOWNERS

Lines changed: 217 additions & 315 deletions
Large diffs are not rendered by default.

.github/CODEOWNERS_baseline_errors.txt

Lines changed: 260 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: learn.microsoft.com feedback control
2+
description: |
3+
⛔ Don't use this template directly. Instead, click the feedback option at the bottom of a learn.microsoft.com page. ⛔
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "## Issue information"
8+
- type: markdown
9+
attributes:
10+
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.
11+
- type: dropdown
12+
id: issue-type
13+
attributes:
14+
label: Type of issue
15+
options:
16+
- Typo
17+
- Code doesn't work
18+
- Missing information
19+
- Outdated article
20+
- Other (describe below)
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: feedback
25+
validations:
26+
required: true
27+
attributes:
28+
label: Description
29+
- type: markdown
30+
attributes:
31+
value: "## 🚧 Article information 🚧"
32+
- type: markdown
33+
attributes:
34+
value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article."
35+
- type: input
36+
id: pageUrl
37+
validations:
38+
required: true
39+
attributes:
40+
label: Page URL
41+
- type: input
42+
id: contentSourceUrl
43+
validations:
44+
required: true
45+
attributes:
46+
label: Content source URL
47+
- type: input
48+
id: documentVersionIndependentId
49+
validations:
50+
required: true
51+
attributes:
52+
label: Document Version Independent Id
53+
- type: input
54+
id: author
55+
validations:
56+
required: true
57+
attributes:
58+
label: Article author
59+
- type: textarea
60+
id: metadata
61+
validations:
62+
required: false
63+
attributes:
64+
label: Metadata
65+
description: >-
66+
Documentation metadata will be applied here for the PRMerger tool

.github/event-processor.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"IdentifyStaleIssues": "On",
2222
"IdentifyStalePullRequests": "On",
2323
"CloseAddressedIssues": "On",
24-
"LockClosedIssues": "On"
24+
"LockClosedIssues": "On",
25+
"EnforceMaxLifeOfIssues": "On"
2526
}

.github/workflows/event-processor.yml

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,29 @@ on:
1717
permissions: {}
1818

1919
jobs:
20-
event-handler:
20+
# This event requires the Azure CLI to get the LABEL_SERVICE_API_KEY from the vault.
21+
# Because the azure/login step adds time costly pre/post Az CLI commands to any every job
22+
# it's used in, split this into its own job so only the event that needs the Az CLI pays
23+
# the cost.
24+
event-handler-with-azure:
2125
permissions:
2226
issues: write
2327
pull-requests: write
2428
# For OIDC auth
2529
id-token: write
2630
contents: read
27-
name: Handle ${{ github.event_name }} ${{ github.event.action }} event
31+
name: Handle ${{ github.event_name }} ${{ github.event.action }} event with azure login
2832
runs-on: ubuntu-latest
33+
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
2934
steps:
3035
- name: 'Az CLI login'
31-
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
32-
uses: azure/login@v1
36+
uses: azure/login@v2
3337
with:
3438
client-id: ${{ secrets.AZURE_CLIENT_ID }}
3539
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
3640
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
3741

3842
- name: 'Run Azure CLI commands'
39-
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
4043
run: |
4144
LABEL_SERVICE_API_KEY=$(az keyvault secret show \
4245
--vault-name issue-labeler \
@@ -55,7 +58,7 @@ jobs:
5558
run: >
5659
dotnet tool install
5760
Azure.Sdk.Tools.GitHubEventProcessor
58-
--version 1.0.0-dev.20231010.2
61+
--version 1.0.0-dev.20240909.2
5962
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
6063
--global
6164
shell: bash
@@ -94,3 +97,58 @@ jobs:
9497
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
9598
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9699
LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }}
100+
101+
event-handler:
102+
permissions:
103+
issues: write
104+
pull-requests: write
105+
name: Handle ${{ github.event_name }} ${{ github.event.action }} event
106+
runs-on: ubuntu-latest
107+
if: ${{ github.event_name != 'issues' || github.event.action != 'opened' }}
108+
steps:
109+
# To run github-event-processor built from source, for testing purposes, uncomment everything
110+
# in between the Start/End-Build From Source comments and comment everything in between the
111+
# Start/End-Install comments
112+
# Start-Install
113+
- name: Install GitHub Event Processor
114+
run: >
115+
dotnet tool install
116+
Azure.Sdk.Tools.GitHubEventProcessor
117+
--version 1.0.0-dev.20240909.2
118+
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
119+
--global
120+
shell: bash
121+
# End-Install
122+
123+
# Testing checkout of sources from the Azure/azure-sdk-tools repository
124+
# The ref: is the SHA from the pull request in that repository or the
125+
# refs/pull/<PRNumber>/merge for the latest on any given PR. If the repository
126+
# is a fork eg. <User>/azure-sdk-tools then the repository down below will
127+
# need to point to that fork
128+
# Start-Build
129+
# - name: Checkout tools repo for GitHub Event Processor sources
130+
# uses: actions/checkout@v3
131+
# with:
132+
# repository: Azure/azure-sdk-tools
133+
# path: azure-sdk-tools
134+
# ref: <refs/pull/<PRNumber>/merge> or <sha>
135+
136+
# - name: Build and install GitHubEventProcessor from sources
137+
# run: |
138+
# dotnet pack
139+
# dotnet tool install --global --prerelease --add-source ../../../artifacts/packages/Debug Azure.Sdk.Tools.GitHubEventProcessor
140+
# shell: bash
141+
# working-directory: azure-sdk-tools/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor
142+
# End-Build
143+
144+
- name: Process Action Event
145+
run: |
146+
cat > payload.json << 'EOF'
147+
${{ toJson(github.event) }}
148+
EOF
149+
github-event-processor ${{ github.event_name }} payload.json
150+
shell: bash
151+
env:
152+
# This is a temporary secret generated by github
153+
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
154+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/event.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
pull-requests: write # to read pull requests and write comments (azure/azure-sdk-actions)
1919
checks: read # to read check status (azure/azure-sdk-actions)
2020
name: Handle ${{ github.event_name }} ${{ github.event.action }} event
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-latest # This image is intentionally set to "latest", and not to a specific version
2222
steps:
2323
- uses: azure/azure-sdk-actions@main
2424
with:

.github/workflows/scheduled-event-processor.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: GitHub Scheduled Event Processor
22

33
on:
44
schedule:
5+
# These are generated/confirmed using https://crontab.cronhub.io/
56
# Close stale issues, runs every day at 1am - CloseStaleIssues
67
- cron: '0 1 * * *'
78
# Identify stale pull requests, every Friday at 5am - IdentifyStalePullRequests
@@ -14,6 +15,10 @@ on:
1415
- cron: '30 4,10,16,22 * * *'
1516
# Lock closed issues, every 6 hours at 05:30 AM, 11:30 AM, 05:30 PM and 11:30 PM - LockClosedIssues
1617
- cron: '30 5,11,17,23 * * *'
18+
# Enforce max life of issues, every M,W,F at 10:00 AM PST - EnforceMaxLifeOfIssues
19+
# Note: GitHub uses UTC, to run at 10am PST, the cron task needs to be 6pm (1800 hours) UTC
20+
# When scheduling for multiple days the numeric days 0-6 (0=Sunday) must be used.
21+
- cron: '0 18 * * 1,3,5'
1722
# This removes all unnecessary permissions, the ones needed will be set below.
1823
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
1924
permissions: {}
@@ -34,7 +39,7 @@ jobs:
3439
run: >
3540
dotnet tool install
3641
Azure.Sdk.Tools.GitHubEventProcessor
37-
--version 1.0.0-dev.20231010.2
42+
--version 1.0.0-dev.20240909.2
3843
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
3944
--global
4045
shell: bash
@@ -126,3 +131,14 @@ jobs:
126131
shell: bash
127132
env:
128133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134+
135+
- name: Enforce Max Life of Issues Scheduled Event
136+
if: github.event.schedule == '0 18 * * 1,3,5'
137+
run: |
138+
cat > payload.json << 'EOF'
139+
${{ toJson(github.event) }}
140+
EOF
141+
github-event-processor ${{ github.event_name }} payload.json EnforceMaxLifeOfIssues
142+
shell: bash
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Python cache
55
__pycache__/
6-
*.pyc
6+
*.py[cod]
77
.pytest_cache
88
.mypy_cache
99
.cache
@@ -59,6 +59,7 @@ conda/assembly/
5959
conda/assembled/
6060
conda/downloaded/
6161
conda/conda-env/
62+
scenario_*.txt
6263

6364
# tox environment folders
6465
.tox/

0 commit comments

Comments
 (0)