Skip to content

bugfix/handle-branch-merges-commit-trailers #146

bugfix/handle-branch-merges-commit-trailers

bugfix/handle-branch-merges-commit-trailers #146

name: "Organisation ruleset test: Common CI"
on:
push:
branches-ignore:
- main
paths:
- .github/workflows/org.common-ci.test.yml
pull_request:
merge_group:
branch_protection_rule:
types: [edited]
jobs:
pre-commit-check:
runs-on: ubuntu-latest
permissions:
contents: read
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout current repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check if pre-commit hook ran before push 1
env:
GH_DEBUG: 1
run: |
gh pr list --search 4cab8236a5506460e5a3984ace07fc3173d417c6 --state merged --json id
gh pr list --search 4cab8236a5506460e5a3984ace07fc3173d417c6 --state merged
is_pr_commit1=$(gh pr list --search 4cab8236a5506460e5a3984ace07fc3173d417c6 --state merged --json id | jq -e '. == []')
echo $is_pr_commit1
continue-on-error: true
- name: Check if pre-commit hook ran before push 2
run: |
is_pr_commit2=$(gh pr list --search da48d51bc4e6d0de29ef75bacf30cc8675617eb1 --state merged --json id | jq -e '. == []')
echo $is_pr_commit2
continue-on-error: true