Skip to content

ci: add comment on PRs targeting main #1

ci: add comment on PRs targeting main

ci: add comment on PRs targeting main #1

name: COMMENT_TARGETS_MAIN
on:
pull_request:
types:
- opened
branches:
- main
permissions:
pull-requests: write
jobs:
comment:
name: Comment on targeting main branch
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Create comment
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
BODY: |
This pull request targets the `main` branch. Please target `main` for bug fixes only. Target `develop` for regular feature development.
run: gh issue comment "$NUMBER" --body "$BODY"