From d2d34f81a5069dede6138d5c2dff0d39633de097 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Thu, 12 Oct 2023 08:57:04 -0400 Subject: [PATCH] Add more automation. Added GitHub workflows for CodeQL static analysis and stale issue grooming. --- .github/workflows/codeql-analysis.yml | 41 +++++++++++++++++++++++++++ .github/workflows/groom-issues.yml | 25 ++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/groom-issues.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..f6a6e0dfb --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + # Runs automatically on the twelfth of every month at 16:26 + - cron: '26 16 12 * *' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-extended,security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/groom-issues.yml b/.github/workflows/groom-issues.yml new file mode 100644 index 000000000..ab7b5bfa5 --- /dev/null +++ b/.github/workflows/groom-issues.yml @@ -0,0 +1,25 @@ +# Automate stale iossue tagging and closing +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + stale-issue-label: "needs info" + days-before-issue-stale: -1 + days-before-issue-close: 60 + close-issue-message: > + Without additional information we're not able to resolve this issue. + Feel free to add more info or respond to any questions above and we + can reopen the case. Thanks for your contribution! + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }}