From e266041f4afe00e8479ff602efbf2baa2ae6b396 Mon Sep 17 00:00:00 2001 From: Jason Dellaluce Date: Wed, 5 Jul 2023 14:52:12 +0000 Subject: [PATCH] update(ci): hold non-patch PRs on release branches Signed-off-by: Jason Dellaluce --- .github/compare-rule-files.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/compare-rule-files.sh b/.github/compare-rule-files.sh index ffb0e7841..323cac775 100755 --- a/.github/compare-rule-files.sh +++ b/.github/compare-rule-files.sh @@ -48,5 +48,16 @@ else fi echo "" >> $RESULT_FILE +if $(git branch --show-current | grep -q "release/"); then + if $(cat $RESULT_FILE | grep -q "\*\*Minor\*\* changes") || $(cat $RESULT_FILE | grep -q "\*\*Major\*\* changes"); then + echo "**Notes**:" >> $RESULT_FILE + echo "" >> $RESULT_FILE + echo "This PR proposes merging major or minor changes into a release branch. Please make sure this is intentional. cc @falcosecurity/rules-maintainers" >> $RESULT_FILE + echo "" >> $RESULT_FILE + echo "/hold" >> $RESULT_FILE + echo "" >> $RESULT_FILE + fi +fi + rm -f tmp_rule_file.yaml rm -f tmp_res.txt