Skip to content

Commit

Permalink
feat: authenticate with github app instllation
Browse files Browse the repository at this point in the history
- [x] add ability to authenticate with GitHub App Installation
- [x] add tests for GitHub App Installation
- [x] add more tests for env vars

repo updates to match standards:

- [x] alphabetize :allthethings:
- [x] add requirements-test.txt to version our testing dependencies
- [x] update Makefile to point linting commands to our linter configs
      that the GitHub Action workflows use
- [x] add linter configs
- [x] add checkov exemptions to Dockerfile
  - custom user - can't do, need root for GitHub action workspace access
- [x] update README, splitting authentication section
- [x] change .pylintrc to .python-lint (pylint default config file)
- [x] updated all examples to default to read contents permissions
- [x] linted files

I'd highly suggest this be a major version change as there are breaking changes:

- [x] standardize boolean environment variables (true or false)
- [x] drop GITHUB_SERVER_URL and instead use GITHUB_ENTERPRISE_URL for enterprise
      customers (matches our other repos)

Signed-off-by: jmeridth <[email protected]>
  • Loading branch information
jmeridth committed Mar 22, 2024
1 parent 41c10f3 commit 4fdfe82
Show file tree
Hide file tree
Showing 37 changed files with 1,395 additions and 195 deletions.
15 changes: 12 additions & 3 deletions .env-example
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
GH_TOKEN = " "
SEARCH_QUERY = "repo:owner/repo is:open is:issue"
LABELS_TO_MEASURE = "waiting-for-review,waiting-for-manager"
GH_APP_ID=""
GH_APP_INSTALLATION_ID=""
GH_APP_PRIVATE_KEY=""
GH_ENTERPRISE_URL = ""
GH_TOKEN = ""
HIDE_AUTHOR = "false"
HIDE_LABEL_METRICS = "false"
HIDE_TIME_TO_ANSWER = "false"
HIDE_TIME_TO_CLOSE = "false"
HIDE_TIME_TO_FIRST_RESPONSE = "false"
IGNORE_USERS = "user1,user2"
LABELS_TO_MEASURE = "waiting-for-review,waiting-for-manager"
SEARCH_QUERY = "repo:owner/repo is:open is:issue"
5 changes: 5 additions & 0 deletions .github/linters/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
exclude = venv,.venv,.git,__pycache__
extend-ignore = C901
max-line-length = 150
statistics = True
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
Loading

0 comments on commit 4fdfe82

Please sign in to comment.