Skip to content

feat(DTO): Enable codegen backend by default #1301

feat(DTO): Enable codegen backend by default

feat(DTO): Enable codegen backend by default #1301

Workflow file for this run

name: "Validate PR target"
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: write
jobs:
main:
name: Validate PR target branch
runs-on: ubuntu-latest
steps:
- name: Check PR target
id: check-pr-target
uses: actions/github-script@v7
with:
script: |
const isFeature = context.payload.pull_request.title.startsWith('feat');
const targetsMain = context.payload.pull_request.base.ref == 'main';
core.setOutput('needs-rebase', isFeature && targetsMain ? 'true' : 'false');
- name: Comment PR
if: steps.check-pr-target.outputs.needs-rebase == 'true'
uses: thollander/actions-comment-pull-request@v2
with:
message: "It looks like you are adding a new feature! :rocket: Please rebase and point your PR to the `develop` branch."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment_tag: check_pr_target
mode: recreate
- name: Fail if feature PR is targeted to main
if: steps.check-pr-target.outputs.needs-rebase == 'true'
uses: actions/github-script@v7
with:
script: |
core.setFailed('Cannot merge feature type PR into main. Merge into a feature branch or develop')