From 3df3a76301ce5c79ced5e14e57feced3a6ac67bb Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Thu, 4 May 2023 22:59:08 -0400 Subject: [PATCH 1/2] Only add .github/labels.yml (not whole venv!) --- bin/react-to-product-owners-yml-changes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/react-to-product-owners-yml-changes.sh b/bin/react-to-product-owners-yml-changes.sh index a1aeb60c78751..9d29a6c36928f 100755 --- a/bin/react-to-product-owners-yml-changes.sh +++ b/bin/react-to-product-owners-yml-changes.sh @@ -10,7 +10,7 @@ branch="getsantry/update-product-area-labels-${sha:0:8}" git config user.email "getsantry[bot]@users.noreply.github.com" git config user.name "getsantry[bot]" git checkout -b "$branch" -git add . +git add .github/labels.yml git commit -m "Sync with product-owners.yml in security-as-code@${sha:0:8}" git push --set-upstream origin "$branch" gh pr create --fill From b5535b771b0e9fa20d2b63071ff3ab2a8301bd52 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Thu, 4 May 2023 23:04:43 -0400 Subject: [PATCH 2/2] Bring over other changes from sentry --- bin/react-to-product-owners-yml-changes.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/react-to-product-owners-yml-changes.sh b/bin/react-to-product-owners-yml-changes.sh index 9d29a6c36928f..9641f7e4e6db3 100755 --- a/bin/react-to-product-owners-yml-changes.sh +++ b/bin/react-to-product-owners-yml-changes.sh @@ -7,10 +7,11 @@ sha=$(git -C /tmp/security-as-code rev-parse @) pip3 install pyyaml==6.0 ./bin/react-to-product-owners-yml-changes.py /tmp/security-as-code/rbac/lib/product-owners.yml branch="getsantry/update-product-area-labels-${sha:0:8}" +message="Sync with product-owners.yml in security-as-code@${sha:0:8}" git config user.email "getsantry[bot]@users.noreply.github.com" git config user.name "getsantry[bot]" git checkout -b "$branch" git add .github/labels.yml -git commit -m "Sync with product-owners.yml in security-as-code@${sha:0:8}" +git commit -n -m "$message" git push --set-upstream origin "$branch" -gh pr create --fill +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))."