Skip to content

refactor(types): clear interfaceGenerator and classGenerator #115

refactor(types): clear interfaceGenerator and classGenerator

refactor(types): clear interfaceGenerator and classGenerator #115

Workflow file for this run

name: Auto PR (develop → main)
# Opens/updates a promotion PR whenever develop advances, so releases
# (babelfhir-ts + the client / dicomweb / oauth-crypto / smart-auth packages,
# which publish on push to main) are one review-and-merge away.
#
# Self-contained (not the org reusable create-pr.yml): this repo is PUBLIC and
# that reusable lives in the PRIVATE .github repo — GitHub blocks a public repo
# from consuming a private repo's reusable workflow.
on:
push:
branches: [develop]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
promote:
name: Create/Update PR develop → main
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Check if PR exists
id: check-pr
run: |
PR_EXISTS=$(gh pr list --base main --head develop --state open --json number --jq length)
echo "pr_exists=$PR_EXISTS" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check diff
id: check-diff
run: |
git fetch origin main
COMMITS_AHEAD=$(git rev-list --count origin/main..origin/develop)
echo "commits_ahead=$COMMITS_AHEAD" >> "$GITHUB_OUTPUT"
if [ "$COMMITS_AHEAD" -gt 0 ]; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
else
echo "has_changes=false" >> "$GITHUB_OUTPUT"
fi
- name: Create PR
if: steps.check-pr.outputs.pr_exists == '0' && steps.check-diff.outputs.has_changes == 'true'
run: |
gh pr create \
--base main \
--head develop \
--title "🚀 Promote develop → main" \
--body "**Automated PR** — merging \`develop\` into \`main\`.
Triggers the release workflows (babelfhir-ts + the client/dicomweb/oauth-crypto/smart-auth packages).
Commits ahead of main: ${{ steps.check-diff.outputs.commits_ahead }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update existing PR
if: steps.check-pr.outputs.pr_exists != '0'
run: |
PR_NUMBER=$(gh pr list --base main --head develop --state open --json number --jq '.[0].number')
gh pr edit "$PR_NUMBER" --body "**Automated PR** — merging \`develop\` into \`main\`.
Triggers the release workflows (babelfhir-ts + the client/dicomweb/oauth-crypto/smart-auth packages).
Commits ahead of main: ${{ steps.check-diff.outputs.commits_ahead }}
_Updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')_"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}