[BUG] Fix corrupted 'Azure Local Cloud Azure Local Cloudnology' terminology across all repos #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Add to Project | |
| on: | |
| issues: | |
| types: [opened, labeled] | |
| pull_request: | |
| types: [opened, labeled] | |
| jobs: | |
| add-to-project: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| item_id: ${{ steps.add.outputs.itemId }} | |
| steps: | |
| - uses: actions/add-to-project@v1.0.2 | |
| id: add | |
| with: | |
| project-url: https://github.com/orgs/AzureLocal/projects/3 | |
| github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} | |
| set-fields: | |
| needs: add-to-project | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'issues' && needs.add-to-project.result == 'success' && needs.add-to-project.outputs.item_id != '' | |
| env: | |
| GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} | |
| PROJECT_ID: "PVT_kwDOCxeiOM4BR2KZ" | |
| SOLUTION_FIELD: "PVTSSF_lADOCxeiOM4BR2KZzg_jXuY" | |
| PRIORITY_FIELD: "PVTSSF_lADOCxeiOM4BR2KZzg_jXvs" | |
| CATEGORY_FIELD: "PVTSSF_lADOCxeiOM4BR2KZzg_jXxA" | |
| ITEM_ID: ${{ needs.add-to-project.outputs.item_id }} | |
| ID_FIELD: "PVTF_lADOCxeiOM4BR2KZzhADImQ" | |
| steps: | |
| - name: Set ID field | |
| run: | | |
| NUMBER=${{ github.event.issue.number || github.event.pull_request.number }} | |
| gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" \ | |
| --field-id "$ID_FIELD" --text "DOCS-$NUMBER" | |
| - name: Set Solution field | |
| run: | | |
| LABELS='${{ toJson(github.event.issue.labels.*.name) }}' | |
| OPTION_ID="" | |
| if echo "$LABELS" | grep -q '"solution/sofs"'; then | |
| OPTION_ID="441d7b73" | |
| elif echo "$LABELS" | grep -q '"solution/avd"'; then | |
| OPTION_ID="88c2cad1" | |
| elif echo "$LABELS" | grep -q '"solution/loadtools"'; then | |
| OPTION_ID="e681af20" | |
| elif echo "$LABELS" | grep -q '"solution/vmconvert"'; then | |
| OPTION_ID="24cfc8b7" | |
| elif echo "$LABELS" | grep -q '"solution/docs-site"'; then | |
| OPTION_ID="409662e1" | |
| elif echo "$LABELS" | grep -q '"solution/workspace"'; then | |
| OPTION_ID="65042935" | |
| elif echo "$LABELS" | grep -q '"solution/toolkit"'; then | |
| OPTION_ID="5a5921eb" | |
| elif echo "$LABELS" | grep -q '"solution/aks"'; then | |
| OPTION_ID="b982b3f9" | |
| elif echo "$LABELS" | grep -q '"solution/sql-ha"'; then | |
| OPTION_ID="4b317a86" | |
| elif echo "$LABELS" | grep -q '"solution/iot"'; then | |
| OPTION_ID="a8348e7b" | |
| elif echo "$LABELS" | grep -q '"solution/vmware-migration"'; then | |
| OPTION_ID="38fc53af" | |
| elif echo "$LABELS" | grep -q '"solution/monitoring"'; then | |
| OPTION_ID="293a0462" | |
| elif echo "$LABELS" | grep -q '"solution/bcdr"'; then | |
| OPTION_ID="7b2cf8f7" | |
| elif echo "$LABELS" | grep -q '"solution/cost"'; then | |
| OPTION_ID="4b39412e" | |
| elif echo "$LABELS" | grep -q '"solution/governance"'; then | |
| OPTION_ID="2534a020" | |
| elif echo "$LABELS" | grep -q '"solution/hydration"'; then | |
| OPTION_ID="6aef96cb" | |
| elif echo "$LABELS" | grep -q '"solution/custom-images"'; then | |
| OPTION_ID="2d4dca21" | |
| elif echo "$LABELS" | grep -q '"solution/app-services"'; then | |
| OPTION_ID="9b88133a" | |
| elif echo "$LABELS" | grep -q '"solution/sql-mi"'; then | |
| OPTION_ID="7fce49ac" | |
| elif echo "$LABELS" | grep -q '"solution/ml-ai"'; then | |
| OPTION_ID="23c5f7a9" | |
| elif echo "$LABELS" | grep -q '"solution/vms"'; then | |
| OPTION_ID="61b679bd" | |
| elif echo "$LABELS" | grep -q '"solution/disconnected"'; then | |
| OPTION_ID="5633c889" | |
| fi | |
| if [ -n "$OPTION_ID" ]; then | |
| gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" \ | |
| --field-id "$SOLUTION_FIELD" --single-select-option-id "$OPTION_ID" | |
| fi | |
| - name: Set Priority field | |
| run: | | |
| LABELS='${{ toJson(github.event.issue.labels.*.name) }}' | |
| OPTION_ID="" | |
| if echo "$LABELS" | grep -q '"priority/critical"'; then | |
| OPTION_ID="74334e8d" | |
| elif echo "$LABELS" | grep -q '"priority/high"'; then | |
| OPTION_ID="2e3ede9d" | |
| elif echo "$LABELS" | grep -q '"priority/medium"'; then | |
| OPTION_ID="7709e85d" | |
| elif echo "$LABELS" | grep -q '"priority/low"'; then | |
| OPTION_ID="2182b5f9" | |
| fi | |
| if [ -n "$OPTION_ID" ]; then | |
| gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" \ | |
| --field-id "$PRIORITY_FIELD" --single-select-option-id "$OPTION_ID" | |
| fi | |
| - name: Set Category field | |
| run: | | |
| LABELS='${{ toJson(github.event.issue.labels.*.name) }}' | |
| OPTION_ID="" | |
| if echo "$LABELS" | grep -q '"type/feature"'; then | |
| OPTION_ID="7a4fa8ea" | |
| elif echo "$LABELS" | grep -q '"type/bug"'; then | |
| OPTION_ID="206e624a" | |
| elif echo "$LABELS" | grep -q '"type/docs"'; then | |
| OPTION_ID="355ce6c1" | |
| elif echo "$LABELS" | grep -q '"type/infra"'; then | |
| OPTION_ID="05996f93" | |
| elif echo "$LABELS" | grep -q '"type/refactor"'; then | |
| OPTION_ID="7f5509ab" | |
| elif echo "$LABELS" | grep -q '"type/security"'; then | |
| OPTION_ID="d2af4749" | |
| fi | |
| if [ -n "$OPTION_ID" ]; then | |
| gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" \ | |
| --field-id "$CATEGORY_FIELD" --single-select-option-id "$OPTION_ID" | |
| fi |