mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 03:31:27 +02:00
ci: introducing cncf/prow-github-actions (#3536)
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
+99
-12
@@ -1,26 +1,113 @@
|
||||
# Contributing
|
||||
|
||||
To develop on this project, please fork the repo and clone into your `$GOPATH`.
|
||||
Thank you for contributing to OAuth2 Proxy. We track bugs, feature requests,
|
||||
and other work in GitHub issues. Please follow the issue and pull request
|
||||
templates, including their checkboxes.
|
||||
|
||||
Dependencies are **not** checked in so please download those separately.
|
||||
Download the dependencies using `go mod download`.
|
||||
## Development setup
|
||||
|
||||
Fork the repository, clone your fork, create a feature branch, and download Go
|
||||
dependencies:
|
||||
|
||||
```bash
|
||||
cd $GOPATH/src/github.com # Create this directory if it doesn't exist
|
||||
git clone git@github.com:<YOUR_FORK>/oauth2-proxy oauth2-proxy/oauth2-proxy
|
||||
cd oauth2-proxy/oauth2-proxy
|
||||
git clone git@github.com:<YOUR_FORK>/oauth2-proxy.git
|
||||
cd oauth2-proxy
|
||||
git switch -c feature/<BRANCH_NAME>
|
||||
go mod download
|
||||
```
|
||||
|
||||
## Pull Requests and Issues
|
||||
Install the Go version declared in the repository's `go.mod`. The
|
||||
[Go installation guide](https://go.dev/doc/install) and
|
||||
[Go downloads page](https://go.dev/dl/) explain how to install a specific
|
||||
release.
|
||||
|
||||
We track bugs and issues using Github.
|
||||
We suggest [Visual Studio Code](https://code.visualstudio.com/docs/languages/go)
|
||||
with the official
|
||||
[Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go).
|
||||
|
||||
If you find a bug, please open an Issue.
|
||||
### Local testing and debugging
|
||||
|
||||
If you want to fix a bug, please fork, create a feature branch, fix the bug and
|
||||
open a PR back to this repo.
|
||||
Please mention the open bug issue number within your PR if applicable.
|
||||
To run OAuth2 Proxy locally with an example upstream and identity provider,
|
||||
use the Makefile in `contrib/local-environment`:
|
||||
|
||||
```bash
|
||||
cd contrib/local-environment
|
||||
make up
|
||||
```
|
||||
|
||||
Other available environments include:
|
||||
|
||||
- Dex with alpha config: `make alpha-config-up`
|
||||
- Keycloak: `make keycloak-up`
|
||||
- Dex with nginx: `make nginx-up`
|
||||
|
||||
See that Makefile for the complete set of environments and their corresponding
|
||||
tear-down commands. The default local credentials are usually
|
||||
`admin@example.com` and `password`.
|
||||
|
||||
The environments use `localtest.me`:
|
||||
|
||||
- OAuth2 Proxy: <http://oauth2-proxy.localtest.me:4180>
|
||||
- Upstream: <http://httpbin.localtest.me:8080>
|
||||
- Dex: <http://dex.localtest.me:5556>
|
||||
|
||||
For VS Code debugging, create `.vscode/launch.json` from the "Run and Debug"
|
||||
view and use `Go: Launch Package`. The following configurations start OAuth2
|
||||
Proxy with the local Dex or Keycloak environments:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch OAuth2 Proxy with Dex",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config",
|
||||
"contrib/local-environment/oauth2-proxy.cfg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Launch OAuth2 Proxy with Keycloak",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"--config",
|
||||
"contrib/local-environment/oauth2-proxy-keycloak.cfg"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Pull requests and issues
|
||||
|
||||
If you find a bug, open an issue. To fix a bug, create a feature branch, make
|
||||
the change, and open a pull request against this repository. Mention the
|
||||
related issue number in the pull request when applicable.
|
||||
|
||||
GitHub's required reviews and CODEOWNERS rules are the authoritative merge
|
||||
approval process. Reviewers should use GitHub's native review interface to
|
||||
approve changes.
|
||||
|
||||
### GitHub commands
|
||||
|
||||
Prow-style commands may be posted as their own line in issue and pull request
|
||||
comments:
|
||||
|
||||
- `/assign` and `/unassign` assign or unassign users.
|
||||
- `/area`, `/kind`, and `/provider` apply a configured classification label.
|
||||
- `/help` adds the `help wanted` label.
|
||||
|
||||
On pull requests only, project reviewers may also use `/lgtm` and
|
||||
`/lgtm cancel` to manage the review-readiness label. A new commit removes the
|
||||
`lgtm` label. The label does not merge a pull request or replace GitHub
|
||||
approval requirements.
|
||||
|
||||
## AI use
|
||||
|
||||
|
||||
Reference in New Issue
Block a user