From 651571a5c571765658939e61f0b1e8de167d6eb8 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:29:24 -0800 Subject: [PATCH] senzing-factory/build-resources#69 add linting --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ------------------- .github/ISSUE_TEMPLATE/feature_request.md | 17 --------- .../README_TEMPLATE/demonstration/README.md | 15 -------- .github/dependabot.yml | 6 +++ .../workflows/add-labels-standardized.yaml | 2 +- .../add-to-project-community-dependabot.yaml | 23 +++++++++++ .../workflows/add-to-project-community.yaml | 21 ++++++++++ .github/workflows/add-to-project-t-comm.yaml | 22 ----------- .github/workflows/lint-workflows.yaml | 17 +++++++++ .../workflows/move-pr-to-done-dependabot.yaml | 12 ++++++ .github/workflows/pylint.yaml | 15 +++++--- PULL_REQUEST_TEMPLATE.md | 13 ------- 12 files changed, 90 insertions(+), 111 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/README_TEMPLATE/demonstration/README.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/add-to-project-community-dependabot.yaml create mode 100644 .github/workflows/add-to-project-community.yaml delete mode 100644 .github/workflows/add-to-project-t-comm.yaml create mode 100644 .github/workflows/lint-workflows.yaml create mode 100644 .github/workflows/move-pr-to-done-dependabot.yaml delete mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d3a80d7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] - -**Smartphone (please complete the following information):** - -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/README_TEMPLATE/demonstration/README.md b/.github/README_TEMPLATE/demonstration/README.md deleted file mode 100644 index 8daa9f8..0000000 --- a/.github/README_TEMPLATE/demonstration/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# name-of-repository - -## Overview - -This demonstration shows... - -## Install - -These instructions will install and run... - -## Test - -## References - -1. [Senzing](http://senzing.com) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1230149 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/add-labels-standardized.yaml b/.github/workflows/add-labels-standardized.yaml index c20a712..1360a67 100644 --- a/.github/workflows/add-labels-standardized.yaml +++ b/.github/workflows/add-labels-standardized.yaml @@ -1,4 +1,4 @@ -name: 'add labels standardized' +name: add labels standardized on: issues: diff --git a/.github/workflows/add-to-project-community-dependabot.yaml b/.github/workflows/add-to-project-community-dependabot.yaml new file mode 100644 index 0000000..ca381ee --- /dev/null +++ b/.github/workflows/add-to-project-community-dependabot.yaml @@ -0,0 +1,23 @@ +name: add to project community dependabot + +on: + pull_request: + branches: [main] + +env: + CREATOR: ${{ github.event.pull_request.user.login }} + GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} + +jobs: + add-to-project-dependabot: + name: add issue to Senzing Community project + runs-on: ubuntu-latest + + steps: + - name: assign issue to project + env: + BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }} + if: ${{ env.BOOL == 'true' }} + uses: senzing-factory/github-action-add-issue-to-project@v1 + with: + project: "https://github.com/orgs/Senzing/projects/${{ vars.SENZING_PROJECT_COMMUNITY }}" diff --git a/.github/workflows/add-to-project-community.yaml b/.github/workflows/add-to-project-community.yaml new file mode 100644 index 0000000..2c76520 --- /dev/null +++ b/.github/workflows/add-to-project-community.yaml @@ -0,0 +1,21 @@ +name: add to project community + +on: + issues: + types: + - opened + - reopened + +jobs: + add-to-project: + name: add issue to project + runs-on: ubuntu-latest + + steps: + - name: assign issue to project + env: + GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} + uses: senzing-factory/github-action-add-issue-to-project@v1 + with: + project: "https://github.com/orgs/Senzing/projects/${{ vars.SENZING_PROJECT_COMMUNITY }}" + column_name: "Backlog" diff --git a/.github/workflows/add-to-project-t-comm.yaml b/.github/workflows/add-to-project-t-comm.yaml deleted file mode 100644 index a9c9a84..0000000 --- a/.github/workflows/add-to-project-t-comm.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Based on -# - https://github.com/srggrs/assign-one-project-github-action - -name: Auto Assign issue to project - -on: - issues: - types: - - reopened - - opened -env: - GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} - -jobs: - assign_one_project: - runs-on: ubuntu-latest - steps: - - name: Assign issues to project - uses: Senzing/github-action-add-issue-to-project@main - with: - project: 'https://github.com/orgs/Senzing/projects/2' - column_name: 'Backlog' diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml new file mode 100644 index 0000000..1bcd936 --- /dev/null +++ b/.github/workflows/lint-workflows.yaml @@ -0,0 +1,17 @@ +name: lint workflows + +on: + push: + branches-ignore: [main] + pull_request: + branches: [main] + +permissions: + contents: read + packages: read + pull-requests: read + statuses: write + +jobs: + lint-workflows: + uses: senzing-factory/build-resources/.github/workflows/lint-workflows.yaml@v1 diff --git a/.github/workflows/move-pr-to-done-dependabot.yaml b/.github/workflows/move-pr-to-done-dependabot.yaml new file mode 100644 index 0000000..582a1b0 --- /dev/null +++ b/.github/workflows/move-pr-to-done-dependabot.yaml @@ -0,0 +1,12 @@ +name: move pr to done dependabot + +on: + pull_request: + branches: [main] + types: [closed] + +jobs: + move-pr-to-done-dependabot: + secrets: + SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }} + uses: senzing-factory/build-resources/.github/workflows/move-pr-to-done.yaml@v1 diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 383e65c..cae7d68 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -1,23 +1,28 @@ -name: Pylint +name: pylint on: [push] jobs: - build: + pylint: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.8", "3.9", "3.10"] + steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + + - name: set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + + - name: install dependencies run: | python -m pip install --upgrade pip pip install pylint - - name: Analysing the code with pylint + + - name: analysing the code with pylint run: | + # shellcheck disable=SC2046 pylint $(git ls-files '*.py') diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 0b11a2f..0000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ -# Pull request questions - -## Which issue does this address - -Issue number: #nnn - -## Why was change needed - -??? - -## What does change improve - -???