react-to-product-owners-yml-changes.sh 989 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. cd "$(dirname "$0")"
  4. cd ..
  5. gh repo clone https://github.com/getsentry/security-as-code /tmp/security-as-code
  6. sha=$(git -C /tmp/security-as-code rev-parse @)
  7. pip3 install pyyaml==6.0
  8. ./bin/react-to-product-owners-yml-changes.py /tmp/security-as-code/rbac/lib/product-owners.yml
  9. branch="getsantry/update-product-areas-${sha:0:8}"
  10. message="Sync with product-owners.yml in security-as-code@${sha:0:8}"
  11. git config user.email "getsantry[bot]@users.noreply.github.com"
  12. git config user.name "getsantry[bot]"
  13. git checkout -b "$branch"
  14. git add .github/labels.yml
  15. git add .github/ISSUE_TEMPLATES/bug.yml
  16. git add .github/ISSUE_TEMPLATES/feature.yml/
  17. git commit -n -m "$message"
  18. git push --set-upstream origin "$branch"
  19. gh pr create --title "meta(routing) $message" --body="Syncing with [``product-owners.yml``](https://github.com/getsentry/security-as-code/blob/$sha/rbac/lib/product-owners.yml) ([docs](https://www.notion.so/473791bae5bf43399d46093050b77bf0))."