Skip to content

Commit

Permalink
feat: Add sync for GitHub issues to Azure DevOps Work items (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
oZakari authored Oct 11, 2024
1 parent 685aa53 commit 400069f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/actions-config/gh-ado-sync-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"log_level": "info",
"ado": {
"organization": "CSUSolEng",
"project": "Well-Architected Framework",
"wit": "GitHub Issue",
"states": {
"new": "New",
"closed": "Closed",
"reopened": "New",
"deleted": "Removed",
"active": "In Progress"
},
"bypassRules": true,
"autoCreate": true,
"areaPath": "Well-Architected Framework"
}
}
31 changes: 31 additions & 0 deletions .github/workflows/ado-sync-workitems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sync Issues to Azure DevOps Work Items

permissions:
contents: read

on:
issues:
types: [opened, closed, deleted, reopened, edited, labeled, unlabeled, assigned, unassigned]
issue_comment:
types: [created]

jobs:
alert:
runs-on: ubuntu-latest
name: Sync workflow
if: github.repository == 'Azure/Azure-Proactive-Resiliency-Library-v2'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: GitHub/ADO Sync
uses: a11smiles/GitSync@v1.2.3
env:
ado_token: '${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}'
github_token: '${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}'
config_file: './.github/actions-config/gh-ado-sync-config.json'
with:
ado: ${{ secrets.ADO_MAPPINGS_HANDLES }}
5 changes: 4 additions & 1 deletion .github/workflows/build-recommendation-object.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: "0 0 * * *"
workflow_dispatch: {}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,7 +41,7 @@ jobs:
run: |
git add ./tools/data/recommendations.json
git commit -m "Update recommendations.json"
git push
git push --set-upstream origin json-object-update
- name: Create PR
env:
Expand Down

0 comments on commit 400069f

Please sign in to comment.