Skip to content

Added a note about applicability for factory reset #20

Added a note about applicability for factory reset

Added a note about applicability for factory reset #20

name: Create Azure DevOps CI on PR
on:
pull_request:
types: [opened]
jobs:
create-work-item:
runs-on: ubuntu-latest
steps:
- name: Create Azure DevOps Task
env:
ADO_ORG_URL: https://dev.azure.com/KMOps
ADO_PROJECT: ContentExperience
ADO_PAT: ${{ secrets.ADO_PAT }}
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
PR_BODY="${{ github.event.pull_request.body }}"
PR_URL="${{ github.event.pull_request.html_url }}"
curl -X POST \
-H "Content-Type: application/json-patch+json" \
-H "Authorization: Basic $(echo -n ":$ADO_PAT" | base64)" \
$ADO_ORG_URL/$ADO_PROJECT/_apis/wit/workitems/$ExternalCI?api-version=6.0 \
-d '[
{
"op": "add",
"path": "/fields/System.Title",
"value": "PR Opened: '"$PR_TITLE"'"
},
{
"op": "add",
"path": "/fields/System.Description",
"value": "Pull Request URL: '"$PR_URL"'\n\n'"$PR_BODY"'"
}
]'