Skip to content

Commit

Permalink
Sanitize pr branch in update-api-files ci yaml file (#5269)
Browse files Browse the repository at this point in the history
* Sanitize pr branch in update-api-files ci yaml file

* remove git fetch origin as it is redundant here

* rush changelog
  • Loading branch information
edwardlee-msft authored Oct 7, 2024
1 parent 07a784e commit dd944cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/update-api-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ jobs:
git config user.name "github-actions[bot]"
# If run from a PR, checkout PR branch and merge in latest changes from main branch
- name: Checkout PR branch and merge main
id: checkout-pr-branch
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
git checkout ${{ github.event.pull_request.head.ref }}
git merge origin/main
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Merge main into PR branch
if: ${{ steps.checkout-pr-branch.outcome == 'success' }}
run: git merge origin/main
# Ensure node version is great enough
- name: Use Node.js
uses: actions/setup-node@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "update-api-files",
"comment": "Sanitize pr branch in update-api-files ci yaml file",
"packageName": "@azure/communication-react",
"email": "edwardlee@microsoft.com",
"dependentChangeType": "patch"
}

0 comments on commit dd944cd

Please sign in to comment.