Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/uml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,25 @@ jobs:
- name: Create PR for changes
if: steps.changes.outputs.changes_exist == 'true'
run: |
git checkout -b update-uml-diagrams
BRANCH_NAME="update-uml-diagrams"

# Delete the branch locally and remotely if it exists
git branch -D $BRANCH_NAME 2>/dev/null || true
git push origin --delete $BRANCH_NAME 2>/dev/null || true

# Create and push the new branch
git checkout -b $BRANCH_NAME
git commit -m "Update UML Diagrams"
git push -u origin update-uml-diagrams
git push -u origin $BRANCH_NAME

# Create PR (will fail gracefully if PR already exists)
gh pr create \
--base main \
--title "Update UML Diagrams" \
--body "This PR updates the UML diagrams
This PR was created automatically by the [UML workflow](https://github.com/pymc-labs/CausalPy/blob/main/.github/workflows/uml.yml).
See the logs [here](https://github.com/pymc-labs/CausalPy/actions/workflows/uml.yml) for more details." \
--label "no releasenotes" \
--reviewer drbenvincent
--reviewer drbenvincent || echo "PR may already exist"
env:
GH_TOKEN: ${{ github.token }}