diff --git a/.gitattributes b/.gitattributes index 90b078a1523..f2c187133c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ /.gitattributes linguist-generated /.github/ISSUE_TEMPLATE/config.yml linguist-generated /.github/pull_request_template.md linguist-generated +/.github/workflows/alert-open-prs.yml linguist-generated /.github/workflows/build.yml linguist-generated /.github/workflows/next-cdktf-version-pr.yml linguist-generated /.github/workflows/provider-upgrade.yml linguist-generated diff --git a/.github/workflows/alert-open-prs.yml b/.github/workflows/alert-open-prs.yml new file mode 100644 index 00000000000..3d66a40f0ee --- /dev/null +++ b/.github/workflows/alert-open-prs.yml @@ -0,0 +1,31 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +name: alert-open-prs +on: + workflow_dispatch: {} + schedule: + - cron: "* */1 * * 1-5" +jobs: + check-open-prs: + runs-on: ubuntu-latest + permissions: + pull-requests: read + env: {} + steps: + - name: Find old PRs + id: old_prs + run: |- + PR_LINKS=$(gh pr list --state open --search "created:<$(date -v-2H +%FT%TZ)" --json url --jq "map(.url)" + if [ "$PR_LINKS" == "[]" ]; then + echo "No PRs open for more than 2 hour(s)" + else + echo "pr_links=$PR_LINKS" >> $GITHUB_OUTPUT + fi + - name: Alert Slack on old PRs + if: ${{ steps.old_prs.outputs.pr_links }} + uses: slackapi/slack-github-action@v1.23.0 + env: + SLACK_WEBHOOK_URL: ${{ secrets.ALERT_PRS_SLACK_WEBHOOK_URL }} + with: + payload: + pr_links: ${{ join(fromJSON(steps.old_prs.outputs.pr_links), ', ') }} diff --git a/.gitignore b/.gitignore index ab7b7425626..7b61e0ea47a 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,5 @@ package-lock.json !/.github/workflows/provider-upgrade.yml !/.github/ISSUE_TEMPLATE/config.yml !/.github/workflows/next-cdktf-version-pr.yml +!/.github/workflows/alert-open-prs.yml !/scripts/should-release.js diff --git a/.projen/files.json b/.projen/files.json index 0c238cae910..1ffd74fcd40 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -3,6 +3,7 @@ ".gitattributes", ".github/ISSUE_TEMPLATE/config.yml", ".github/pull_request_template.md", + ".github/workflows/alert-open-prs.yml", ".github/workflows/build.yml", ".github/workflows/next-cdktf-version-pr.yml", ".github/workflows/provider-upgrade.yml", diff --git a/package.json b/package.json index 3e3021aa385..1bcf66dabf8 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "jsii-pacmak": "^1.72.0", "node-fetch": "cjs", "npm-check-updates": "^16", - "projen": "^0.65.50", + "projen": "^0.65.52", "standard-version": "^9", "typescript": "^3.9.10" }, diff --git a/yarn.lock b/yarn.lock index 79ce6f7da07..5a8ac93574e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -160,9 +160,9 @@ jsii-srcmak "^0.1.741" "@cdktf/provider-project@^0.2.8": - version "0.2.80" - resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.2.80.tgz#da98a778ffe838926c0651798eb7dfefd196bb01" - integrity sha512-AtLUjlnG52w7HDzGb4WwOVorPxHBOufalNB9ElS0SFRMJsVEdAd2d+xxubKpUza6pzEvk/hAVO78koEf6ZcRMQ== + version "0.2.81" + resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.2.81.tgz#37652aa1f2742764b188d3d77e681bc9a1714ec2" + integrity sha512-hTVkP/lZnP82kaegXweeAbGEgwZUQKh8gR5v+h3mn43LucH7CeqB6rIyo0+UnbOy3bdBcxLWomDCaB45OHz83w== dependencies: change-case "^4.1.2" fs-extra "^10.1.0" @@ -3260,10 +3260,10 @@ progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -projen@^0.65.50: - version "0.65.50" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.65.50.tgz#ad643b9bb8a138468c19ca87efdf3e13406a1834" - integrity sha512-+hheiErNdyDZiMAM/aByXu+n53v/3NNUlVrWVS/RGRGqSj5dzEbFDIdX+EtOU4w9N1HbEGOZZqfU7qTxYvsqQw== +projen@^0.65.52: + version "0.65.52" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.65.52.tgz#e1dec5667ca2534cb760a40b87400ac78d9ffdf0" + integrity sha512-GDl5st+HSUctCAAuOMyAL1ZmdmC9g16EnHRkS5C0n6BVC/x+0X4/UYXCpsNhxGoN/lt9zWg+X6+b5dKfhyKLPw== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3"