Skip to content

Commit

Permalink
Merge pull request #108 from jmeridth/jm-more-standardization
Browse files Browse the repository at this point in the history
chore: catch up repo standards
  • Loading branch information
jmeridth authored Apr 1, 2024
2 parents 1a4a67e + a64eba0 commit ba84f48
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/linters/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile = black
5 changes: 5 additions & 0 deletions .github/linters/.mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[mypy]
disable_error_code = attr-defined, import-not-found

[mypy-github3.*]
ignore_missing_imports = True
2 changes: 0 additions & 2 deletions .github/linters/isort.cfg

This file was deleted.

8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ clean:

.PHONY: lint
lint:
pylint --rcfile=.github/linters/.python-lint --fail-under=9.0 *.py
# stop the build if there are Python syntax errors or undefined names
flake8 . --config=.github/linters/.flake8 --count --select=E9,F63,F7,F82 --exclude .venv --show-source
flake8 . --config=.github/linters/.flake8 --count --select=E9,F63,F7,F82 --show-source
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --config=.github/linters/.flake8 --count --exclude .venv --exit-zero --max-complexity=10 --max-line-length=127
flake8 . --config=.github/linters/.flake8 --count --exit-zero --max-complexity=15 --max-line-length=150
isort --settings-file=.github/linters/.isort.cfg .
pylint --rcfile=.github/linters/.python-lint --fail-under=9.0 *.py
mypy --config-file=.github/linters/.mypy.ini *.py
black .
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,30 @@ Note: Your GitHub token will need to have read access to all the repositories in

Below are the allowed configuration options:

#### Authentication

This action can be configured to authenticate with GitHub App Installation or Personal Access Token (PAT). If all configuration options are provided, the GitHub App Installation configuration has precedence. You can choose one of the following methods to authenticate:

##### GitHub App Installation

| field | required | default | description |
|-------------------------------|----------|---------|-------------|
| `GH_APP_ID` | True | `""` | GitHub Application ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
| `GH_APP_INSTALLATION_ID` | True | `""` | GitHub Application Installation ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
| `GH_APP_PRIVATE_KEY` | True | `""` | GitHub Application Private Key. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |

##### Personal Access Token (PAT)

| field | required | default | description |
|-------------------------------|----------|---------|-------------|
| `GH_TOKEN` | True | `""` | The GitHub Token used to scan the repository. Must have read access to all repository you are interested in scanning. |

#### Other Configuration Options

| field | required | default | description |
|---------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `ACTIVITY_METHOD` | false | `"pushed"` | How to get the last active date of the repository. Defaults to `pushed`, which is the last time any branch had a push. Can also be set to `default_branch_updated` to instead measure from the latest commit on the default branch (good for filtering out dependabot ) |
| `GH_APP_ID` | false | `""` | GitHub Application ID. |
| `GH_APP_INSTALLATION_ID` | false | `""` | GitHub Application Installation ID. |
| `GH_APP_PRIVATE_KEY` | false | `""` | GitHub Application Private Key |
| `GH_ENTERPRISE_URL` | false | `""` | URL of GitHub Enterprise instance to use for auth instead of github.com |
| `GH_TOKEN` | true | | The GitHub Token used to scan repositories. Must have read access to all repositories you are interested in scanning |
| `INACTIVE_DAYS` | true | | The number of days used to determine if repository is stale, based on `push` events |
| `EXEMPT_REPOS` | false | | Comma separated list of repositories to exempt from being flagged as stale. Supports Unix shell-style wildcards. ie. `EXEMPT_REPOS = "stale-repos,test-repo,conf-*"` |
| `EXEMPT_TOPICS` | false | | Comma separated list of topics to exempt from being flagged as stale |
Expand Down
4 changes: 4 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
black==24.3.0
flake8==7.0.0
mypy==1.8.0
mypy-extensions==1.0.0
pylint==3.1.0
pytest==8.1.1
pytest-cov==5.0.0
types-python-dateutil==2.9.0.20240316
types-requests==2.31.0.20240311

0 comments on commit ba84f48

Please sign in to comment.