Open Eu4ng opened 8 months ago
Running your pull_request workflow when a pull request merges
PR 이 병합된 이후 호출하는 방법
on:
pull_request:
types:
- closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: |
echo The PR was merged
Just enforce it with automation. Prs get rejected if the branch didn't match a format. Pr titles get auto formatted. Only allow Squash merge to master. Only allow "pr title as squash merge commit" Auto write a comment with the ticket so it links to JIRA. Force delete branch on merge.
참고
알아낸 것
Require linear history
옵션을 사용하면 Merge Commit 자체를 막을 수는 있다.GitHub Enterprise Server
나GitLab
의 pre-receive-hook 을 사용하여 서버 hook 을 이용하는 것이 좋다.