This is an automated email from the ASF dual-hosted git repository.

davidarthur pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new da7d56a5cc9 MINOR Add a required status check for trunk (#19122)
da7d56a5cc9 is described below

commit da7d56a5cc988d1b967b98ab1220c87b711dd332
Author: David Arthur <[email protected]>
AuthorDate: Wed Mar 5 14:48:46 2025 -0500

    MINOR Add a required status check for trunk (#19122)
    
    Add a single job that runs after the whole CI pipeline and make it a
    required check before merging a PR. This will prevent us from merging
    PRs which have not run through the CI.
    
    Reviewers: Justine Olshan <[email protected]>
---
 .asf.yaml                   | 16 ++++++++++++++++
 .github/workflows/build.yml | 25 +++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index 3daa2733031..7ead3b1a0c2 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -45,3 +45,19 @@ github:
     squash_commit_message: PR_TITLE_AND_DESC
     merge: false
     rebase: false
+
+  protected_branches:
+    trunk:
+      required_status_checks:
+        strict: false
+        contexts:
+          - build / CI checks completed
+      required_pull_request_reviews:
+        required_approving_review_count: 1
+
+    # Disable force push on release branches
+    4.0: {}
+    3.9: {}
+    3.8: {}
+    3.7: {}
+    3.6: {}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 619673b9cc5..7c2bec9b57a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -360,3 +360,28 @@ jobs:
           git add test-catalog
           git diff --quiet && git diff --staged --quiet || git commit -m 
"$COMMIT_MSG"
           git push
+
+  checks-complete:
+    name: "CI checks completed"
+    needs: [configure, validate, test]
+    if: always()
+    runs-on: ubuntu-latest
+    steps:
+      - name: Env
+        run: printenv
+        env:
+          GITHUB_CONTEXT: ${{ toJson(github) }}
+      - name: Fail if Draft
+        if: ${{ needs.configure.outputs.is-draft }}
+        run: |
+          echo "Cannot merge a draft PR"
+          exit 1
+      - name: Check Dependency Outcomes
+        run: |
+          if [[ "${{ needs.validate.result }}" == "success" && "${{ 
needs.test.result }}" == "success" ]]; then
+            echo "Required jobs completed successfully!"
+            exit 0
+          else
+            echo "Required jobs did not complete successfully"
+            exit 1
+          fi

Reply via email to