Skip to content

Commit

Permalink
update(ci): hold non-patch PRs on release branches
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
  • Loading branch information
jasondellaluce authored and poiana committed Jul 5, 2023
1 parent dc90ca5 commit e266041
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/compare-rule-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e266041

Please sign in to comment.