From 358469e5bbb5e9507777c8c0b563c761213ececd Mon Sep 17 00:00:00 2001 From: Tomasz 'CeDeROM' CEDRO Date: Tue, 6 May 2025 15:05:31 +0200 Subject: [PATCH] github: Setup protection for master branch. * We do not have "Settings" tab in the Apache's owned repository, thus we need to update .asf.yaml file with repository settings. * No direct push to master branch is possible. * Require status checks to pass before merge. * Setup reviews parameters. * Require signatures. * Require conversation resolution. * Require linear history. Signed-off-by: Tomasz 'CeDeROM' CEDRO --- .asf.yaml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index c71e5702fa8..f8763d779e4 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -1,10 +1,9 @@ +# Reference: https://github.com/apache/infrastructure-asfyaml. github: description: "Apache NuttX is a mature, real-time embedded operating system (RTOS)" homepage: https://nuttx.apache.org/ features: - # Enable issues management issues: true - # Enable project for project management boards projects: true labels: - nuttx @@ -14,9 +13,21 @@ github: - mcu - microcontroller enabled_merge_buttons: - # disable squash button: squash: false - # disable merge button: merge: false - # enable rebase button: rebase: true + protected_branches: + master: + required_status_checks: + strict: true + contexts: + - Check + - Lint + - Build + required_pull_request_reviews: + dismiss_stale_reviews: true + require_last_push_approval: true + required_approving_review_count: 2 + required_linear_history: true + required_signatures: true + required_conversation_resolution: true