Skip to content

Commit ba84f48

Browse files
authored
Merge pull request #108 from jmeridth/jm-more-standardization
chore: catch up repo standards
2 parents 1a4a67e + a64eba0 commit ba84f48

File tree

6 files changed

+36
-9
lines changed

6 files changed

+36
-9
lines changed

.github/linters/.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
profile = black

.github/linters/.mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mypy]
2+
disable_error_code = attr-defined, import-not-found
3+
4+
[mypy-github3.*]
5+
ignore_missing_imports = True

.github/linters/isort.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ clean:
88

99
.PHONY: lint
1010
lint:
11-
pylint --rcfile=.github/linters/.python-lint --fail-under=9.0 *.py
1211
# stop the build if there are Python syntax errors or undefined names
13-
flake8 . --config=.github/linters/.flake8 --count --select=E9,F63,F7,F82 --exclude .venv --show-source
12+
flake8 . --config=.github/linters/.flake8 --count --select=E9,F63,F7,F82 --show-source
1413
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
15-
flake8 . --config=.github/linters/.flake8 --count --exclude .venv --exit-zero --max-complexity=10 --max-line-length=127
14+
flake8 . --config=.github/linters/.flake8 --count --exit-zero --max-complexity=15 --max-line-length=150
15+
isort --settings-file=.github/linters/.isort.cfg .
16+
pylint --rcfile=.github/linters/.python-lint --fail-under=9.0 *.py
17+
mypy --config-file=.github/linters/.mypy.ini *.py
1618
black .

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,30 @@ Note: Your GitHub token will need to have read access to all the repositories in
2929

3030
Below are the allowed configuration options:
3131

32+
#### Authentication
33+
34+
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:
35+
36+
##### GitHub App Installation
37+
38+
| field | required | default | description |
39+
|-------------------------------|----------|---------|-------------|
40+
| `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. |
41+
| `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. |
42+
| `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. |
43+
44+
##### Personal Access Token (PAT)
45+
46+
| field | required | default | description |
47+
|-------------------------------|----------|---------|-------------|
48+
| `GH_TOKEN` | True | `""` | The GitHub Token used to scan the repository. Must have read access to all repository you are interested in scanning. |
49+
50+
#### Other Configuration Options
51+
3252
| field | required | default | description |
3353
|---------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3454
| `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 ) |
35-
| `GH_APP_ID` | false | `""` | GitHub Application ID. |
36-
| `GH_APP_INSTALLATION_ID` | false | `""` | GitHub Application Installation ID. |
37-
| `GH_APP_PRIVATE_KEY` | false | `""` | GitHub Application Private Key |
3855
| `GH_ENTERPRISE_URL` | false | `""` | URL of GitHub Enterprise instance to use for auth instead of github.com |
39-
| `GH_TOKEN` | true | | The GitHub Token used to scan repositories. Must have read access to all repositories you are interested in scanning |
4056
| `INACTIVE_DAYS` | true | | The number of days used to determine if repository is stale, based on `push` events |
4157
| `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-*"` |
4258
| `EXEMPT_TOPICS` | false | | Comma separated list of topics to exempt from being flagged as stale |

requirements-test.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
black==24.3.0
22
flake8==7.0.0
3+
mypy==1.8.0
4+
mypy-extensions==1.0.0
35
pylint==3.1.0
46
pytest==8.1.1
57
pytest-cov==5.0.0
8+
types-python-dateutil==2.9.0.20240316
9+
types-requests==2.31.0.20240311

0 commit comments

Comments
 (0)