Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: github app authentication and repo standardization #43

Merged
merged 10 commits into from
Apr 8, 2024

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Apr 8, 2024

The size of this PR is necessary. Not my usual PR size.

No external changes from a user's perspective but a bit of an overhaul/refactor. I'd still say a minor release, not major. Unless we feel setting minimum python to 3.10. We are building the action with 3.12 now but test against 3.10+.

Pull Request

Proposed Changes

  • setting minimum python to 3.10 (allows usage of unions on types)
  • add ability for users to authenticate with GitHub App Installation
  • standardize repo
    • Makefile
    • Linting
    • same workflows as other OSPO GitHub Actions
  • add @jmeridth to CODEOWNERS
  • update .env-example
  • update README
  • standardize all workflows (including examples) permissions
    • contents: read by default
    • more details in jobs
  • add tests
    • coverage to 60% for now, will get above 80% later

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, or breaking

@jmeridth jmeridth added the enhancement New feature or request label Apr 8, 2024
@jmeridth jmeridth self-assigned this Apr 8, 2024
@jmeridth
Copy link
Member Author

jmeridth commented Apr 8, 2024

That should have been run against python 3.10, not python 3.1. 😕

Re-running.

UPDATE: Versions needed to be in string format

@jmeridth jmeridth force-pushed the jm-github-app-auth-and-repo-standardization branch 2 times, most recently from 3ef62ed to 9f876be Compare April 8, 2024 15:54
- [x] setting minimum python to 3.10 (allows usage of unions on types)
- [x] add ability for users to authenticate with GitHub App Installation
- [x] standardize repo
  - [x] Makefile
  - [x] Linting
  - [x] same workflows as other OSPO GitHub Actions
- [x] add @jmeridth to CODEOWNERS
- [x] update .env-example
- [x] update README
- [x] standardize all workflows (including examples) permissions
  - [x] contents: read by default
  - [x] more details in jobs
- [x] add tests
  - [x] coverage to 60% for now, will get above 80% later
- [x] pull request template

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth force-pushed the jm-github-app-auth-and-repo-standardization branch from 9f876be to c79601a Compare April 8, 2024 15:56
Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for handling such a massive change and leveling up the repo to fit with our other actions!

.github/workflows/codeql.yml Outdated Show resolved Hide resolved
.github/workflows/codeql.yml Outdated Show resolved Hide resolved
FROM python:3.8-slim-buster
#checkov:skip=CKV_DOCKER_2
#checkov:skip=CKV_DOCKER_3
FROM python:3.12-slim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are dropping support for 3.8, lets do a major version bump and note in the release notes that the breaking change is dropping python 3.8 support.

test_auth.py Outdated Show resolved Hide resolved
test_env.py Outdated Show resolved Hide resolved
test_env.py Outdated Show resolved Hide resolved
.github/workflows/stale.yaml Show resolved Hide resolved
@zkoppert zkoppert added the breaking breaking change. Major version bump needed label Apr 8, 2024
zkoppert and others added 7 commits April 8, 2024 10:09
Co-authored-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Zack Koppert <zkoppert@github.com>
Co-authored-by: Zack Koppert <zkoppert@github.com>
cm -> context_manager

Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth merged commit ee6cac5 into main Apr 8, 2024
18 checks passed
@jmeridth jmeridth deleted the jm-github-app-auth-and-repo-standardization branch April 8, 2024 17:24
jmeridth added a commit that referenced this pull request Apr 8, 2024
Since we're about to do a major version release, need to update action.yml to v3.  Should have been done in #43

- [x] update action.yml to v3
- [x] update dependencies

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth mentioned this pull request Apr 8, 2024
5 tasks
jmeridth added a commit that referenced this pull request Apr 8, 2024
I renamed the workflow from linter.yml to super-linter.yml in #43

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth mentioned this pull request Apr 8, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking breaking change. Major version bump needed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants