Skip to content

Commit

Permalink
Update sync-to-azdo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RajeevPentyala authored Nov 21, 2023
1 parent f4a9b9f commit ebb0c64
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/sync-to-azdo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
ITERATION: ${{ steps.set-iteration.outputs.ITERATION }}
AREA: ${{ steps.set-area.outputs.AREA }}
steps:
- name: Set Milestone
id: set-milestone
Expand Down Expand Up @@ -81,6 +82,9 @@ jobs:
YEAR=$(echo $MILESTONE_PART | cut -d' ' -f2)
echo "YEAR=$YEAR" >> $GITHUB_ENV
- name: Print Milestone Year
run: echo "Year ${{ env.YEAR }}"

- name: Validate Month and Year
id: validate-month-and-year
run: |
Expand Down Expand Up @@ -125,9 +129,9 @@ jobs:
if: ${{ env.MONTH_VALID == 'true' && env.YEAR_VALID == 'true' }}
run: echo "QUARTER is $QUARTER"

- name: Increment Year if Q1 or Q2
- name: Increment Year if applicable
id: increment-year
if: ${{ env.QUARTER == 'Q1' || env.QUARTER == 'Q2' }}
if: ${{ env.MONTH == 'July' || env.MONTH == 'August' || env.MONTH == 'September' || env.MONTH == 'October' || env.MONTH == 'November' }}
run: |
YEAR=$(($YEAR + 1))
echo "YEAR=$YEAR" >> $GITHUB_ENV
Expand Down Expand Up @@ -155,7 +159,19 @@ jobs:
echo "Invalid month or year. Using default Iteration Path."
echo "Iteration Path - OneCatTools"
echo "ITERATION=OneCatTools" >> $GITHUB_OUTPUT
fi
fi
- name: Set Area Path
id: set-area
run: |
# Check if $MILESTONE is not blank and contains 'backlog' (case-insensitive)
if [ -n "$MILESTONE" ] && [[ "${MILESTONE,,}" == *"backlog"* ]]; then
echo "Area - OneCatTools\\CreatorKit\\Backlog"
echo "AREA=OneCatTools\\CreatorKit\\Backlog" >> $GITHUB_OUTPUT
else
echo "Area - OneCatTools\\CreatorKit"
echo "AREA=OneCatTools\\CreatorKit" >> $GITHUB_OUTPUT
fi
alertEnhancementCK:
if: |
Expand All @@ -170,7 +186,7 @@ jobs:
github_token: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}"
ado_organization: "cattools"
ado_project: "OneCatTools"
ado_area_path: "OneCatTools\\CreatorKit\\Develop"
ado_area_path: "${{ needs.prepareIterationPathJob.outputs.AREA }}"
ado_iteration_path: "${{ needs.prepareIterationPathJob.outputs.ITERATION }}"
ado_wit: "User Story"
ado_new_state: "New"
Expand All @@ -192,7 +208,7 @@ jobs:
github_token: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}"
ado_organization: "cattools"
ado_project: "OneCatTools"
ado_area_path: "OneCatTools\\CreatorKit\\Develop"
ado_area_path: "${{ needs.prepareIterationPathJob.outputs.AREA }}"
ado_iteration_path: "${{ needs.prepareIterationPathJob.outputs.ITERATION }}"
ado_wit: "Bug"
ado_new_state: "New"
Expand All @@ -214,7 +230,7 @@ jobs:
github_token: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}"
ado_organization: "cattools"
ado_project: "OneCatTools"
ado_area_path: "OneCatTools\\CreatorKit\\Develop"
ado_area_path: "${{ needs.prepareIterationPathJob.outputs.AREA }}"
ado_iteration_path: "${{ needs.prepareIterationPathJob.outputs.ITERATION }}"
ado_wit: "Question"
ado_new_state: "New"
Expand Down

0 comments on commit ebb0c64

Please sign in to comment.