Skip to content

Commit 433a693

Browse files
chore(ci-deps): Update files based on repository configuration (#217)
Co-authored-by: pleo-file-distributor[bot] <114988919+pleo-file-distributor[bot]@users.noreply.github.com>
1 parent 44fda1a commit 433a693

File tree

3 files changed

+92
-1
lines changed

3 files changed

+92
-1
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# THIS CODE WAS AUTOGENERATED. DO NOT MODIFY THIS FILE DIRECTLY
2+
# THE SOURCE CODE LIVES IN A DIFFERENT REPOSITORY:
3+
# - centralized-templates
4+
# FILE STEWARD: @pleo-io/team-devx,@pleo-bot-auto-approver
5+
6+
# Warn and later close PRs that have had no activity for a specified amount of time.
7+
# This reminds us that code in most cases only provide value once merged.
8+
9+
name: "Close Stale PRs"
10+
on:
11+
schedule:
12+
- cron: "0 9,16 * * *"
13+
14+
jobs:
15+
stale:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
permissions:
19+
contents: write
20+
issues: write
21+
pull-requests: write
22+
steps:
23+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
24+
with:
25+
stale-pr-label: stale
26+
exempt-pr-labels: never-stale,dependencies
27+
stale-pr-message: |
28+
This PR is marked as stale since it has been open for 30 days with no activity.
29+
30+
Remove the stale label or make a comment, otherwise the PR will be closed in 7 days.
31+
close-pr-message: "This PR was closed because it has been stale for 7 days with no activity."
32+
days-before-issue-stale: -1
33+
days-before-pr-stale: 30
34+
days-before-issue-close: -1
35+
days-before-pr-close: 7
36+
start-date: "2023-01-12"

.github/workflows/codeql-analysis.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ env:
3030
GRADLE_SCRIPT_PATH: ./gradlew
3131
setWizCliDepsScanPath: .
3232
setWizCliDepsPolicy: Pleo-Default-vulnerabilities-policy
33+
runWizCliDepsScan: false
3334

3435
jobs:
3536
preflight:
3637
name: Determine if CodeQL should run
3738
runs-on: ubuntu-latest
3839
outputs:
3940
should_run_analyze: ${{ steps.maybe_skip_analyze.outputs.should_run_analyze }}
41+
should_run_wiz_cli: ${{ steps.maybe_skip_wiz_cli.outputs.should_run_wiz_cli }}
4042
working_language: ${{steps.working_language_step.outputs.WORKING_LANGUAGE}}
4143
steps:
4244
- uses: winterjung/split@a211a1c46e35fcdc4097d59dd6282d4a9859651b # v2
@@ -67,12 +69,24 @@ jobs:
6769
echo "Running CodeQL analysis"
6870
echo "should_run_analyze=true" >> "$GITHUB_OUTPUT"
6971
fi
72+
- id: maybe_skip_wiz_cli
73+
name: Check if Wiz-CLI Deps Scan should run
74+
shell: bash
75+
run: |
76+
if [[ "${{ env.runWizCliDepsScan }}" == "true" ]]; then
77+
echo "should_run_wiz_cli=true" >> "$GITHUB_OUTPUT"
78+
else
79+
echo "should_run_wiz_cli=false" >> "$GITHUB_OUTPUT"
80+
fi
7081
- id: working_language_step
7182
name: We check if the repository language is supported by CodeQL
7283
run: echo "WORKING_LANGUAGE=${{env[format('language_{0}', github.event.repository.language)]}}" >> "$GITHUB_OUTPUT"
7384

7485
wiz-cli:
7586
name: Scan Dependencies with Wiz CLI
87+
if: ${{ needs.preflight.outputs.should_run_wiz_cli == 'true'}}
88+
needs:
89+
- preflight
7690
runs-on: ubuntu-latest
7791
defaults:
7892
run:
@@ -115,7 +129,6 @@ jobs:
115129
if: ${{ (needs.preflight.outputs.should_run_analyze == 'true') && (needs.preflight.outputs.working_language != '')}}
116130
needs:
117131
- preflight
118-
- wiz-cli
119132
runs-on: codeql-runner
120133
timeout-minutes: 30
121134
permissions:

.github/workflows/pr-help.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# THIS CODE WAS AUTOGENERATED. DO NOT MODIFY THIS FILE DIRECTLY
2+
# THE SOURCE CODE LIVES IN A DIFFERENT REPOSITORY:
3+
# - centralized-templates
4+
# FILE STEWARD: @pleo-io/team-devx,@pleo-bot-auto-approver
5+
6+
name: Check PR
7+
on:
8+
pull_request:
9+
types:
10+
- assigned
11+
- unassigned
12+
- labeled
13+
- unlabeled
14+
- opened
15+
- edited
16+
- closed
17+
- reopened
18+
- synchronize
19+
- ready_for_review
20+
- locked
21+
- unlocked
22+
- review_requested
23+
- review_request_removed
24+
25+
concurrency:
26+
group: ci-${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
env:
30+
autoApproveEnabled: true
31+
32+
jobs:
33+
auto-approve-pr:
34+
runs-on: ubuntu-latest
35+
name: Auto-approve PR
36+
if: ${{ contains(fromJSON('["pleo-bot-renovate", "pleo-file-distributor[bot]"]'), github.actor) && contains(github.event.pull_request.labels.*.name, 'autoapprove') }}
37+
steps:
38+
- uses: hmarr/auto-approve-action@v3
39+
if: env.autoApproveEnabled == 'true'
40+
with:
41+
github-token: ${{ secrets.PLEO_BOT_AUTO_APPROVER_TOKEN }}
42+
review-message: "This has been auto-approved by @pleo-bot-auto-approver. If your PR isn't being auto-merged as desired, make sure to add @pleo-bot-auto-approver to the CODEOWNERS file. More details how to use Renovate [here](https://www.notion.so/pleo/How-to-use-Renovate-781e4861200744c6b38d3efd8c6d525a?pvs=4)"

0 commit comments

Comments
 (0)