diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..dcba7d7 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,26 @@ +docs: + - all: + - changed-files: + - any-glob-to-any-file: + - README.md + - SUPPORT.md + - all-globs-to-all-files: + - '!src/**' + +internal: + - all: + - changed-files: + - any-glob-to-any-file: + - .github/** + - .vscode/** + - .husky/** + - .gitignore + - .vscode-test.mjs + - .vscodeignore + - biome.json + - bun.lock + - esbuild.js + - tsconfig.json + + - all-globs-to-all-files: + - '!src/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..f2114dc --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,33 @@ +name: Labels +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + # For label-checker + - labeled + - unlabeled + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v6 + if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }} + - run: echo "Done adding labels" + # Run this after labeler applied labels + check-labels: + needs: + - labeler + permissions: + pull-requests: read + runs-on: ubuntu-latest + steps: + - uses: docker://agilepathway/pull-request-label-checker:latest + with: + one_of: breaking,security,feature,bug,refactor,upgrade,docs,internal + repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/latest-changes.yml b/.github/workflows/latest-changes.yml new file mode 100644 index 0000000..fa0839d --- /dev/null +++ b/.github/workflows/latest-changes.yml @@ -0,0 +1,34 @@ +name: Latest Changes + +on: + pull_request_target: + branches: + - main + types: + - closed + workflow_dispatch: + inputs: + number: + description: PR number + required: true + +jobs: + latest-changes: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - uses: actions/checkout@v6 + with: + # To allow latest-changes to commit to the main branch + token: ${{ secrets.FASTAPI_VSCODE_LATEST_CHANGES }} + - uses: tiangolo/latest-changes@0.4.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + latest_changes_file: release-notes.md + latest_changes_header: '# Latest Changes' + end_regex: '^## ' + debug_logs: true + label_header_prefix: '## ' diff --git a/release-notes.md b/release-notes.md new file mode 100644 index 0000000..e31789f --- /dev/null +++ b/release-notes.md @@ -0,0 +1,3 @@ +# Release Notes + +## Latest Changes