check-changelog 539 B

123456789101112131415161718
  1. #!/bin/sh
  2. echo "looking for change log"
  3. git remote add upstream https://git.pleroma.social/pleroma/pleroma-fe.git
  4. git fetch upstream ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}:refs/remotes/upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  5. git diff --raw --no-renames upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD -- changelog.d | \
  6. grep ' A\t' | grep '\.\(skip\|add\|remove\|change\|fix\|security\)$'
  7. ret=$?
  8. if [ $ret -eq 0 ]; then
  9. echo "found a changelog entry"
  10. exit 0
  11. else
  12. echo "changelog entry not found"
  13. exit 1
  14. fi