A simple service to query GitHub issues & pull requests.
- See Server Mode for using it as an entrello service.
- See CLI Mode for using it as a CLI tool.
Start the server:
go run ./cmd/server
Fetch self-assigned issues from personal repositories.
Fetch pull requests that meet all of the following conditions:
- belongs to the configured organization
- belongs to one of the configured subscribed repositories
- neither created by nor assigned to the configured user
- not draft
Fetch pull requests that meet all of the following conditions:
- belongs to the configured organization
- created by the configured user
Fetch pull requests that meet all of the following conditions:
- belongs to the configured organization
- assigned to the configured user
- not created by configured user
The result set of each endpoint listed above can be alternatively retrieved using the corresponding CLI command.
go run ./cmd/cli
go run ./cmd/cli prlo
go run ./cmd/cli prlmy
go run ./cmd/cli prlme
Put your environment variables in a file called .env
, based on .env.example
.
Environment Variable | Description |
---|---|
PERSONAL_ACCESS_TOKEN |
GitHub personal access token |
ORG_NAME |
GitHub organization name (required for prlo , prlmy and prlme ) |
USER_NAME |
GitHub user name (required for prlo and prlme ) |
SUBSCRIBED_REPOS |
Subscribed GitHub repositories (required for prlo ) |
PORT |
HTTP port (server mode only) |
SECRET |
API secret (server mode only, optional) |
A new Docker image will be created upon each release.
-
Authenticate with the GitHub container registry (only once):
echo $GITHUB_ACCESS_TOKEN | docker login ghcr.io -u GITHUB_USERNAME --password-stdin
-
Pull the latest Docker image:
docker pull ghcr.io/utkuufuk/github-service/image:latest
-
Start a container:
# server docker run -d \ -p <PORT>:<PORT> \ --env-file </absolute/path/to/.env> \ --restart unless-stopped \ --name github-service \ ghcr.io/utkuufuk/github-service/image:latest # CLI docker run --rm \ --env-file </absolute/path/to/.env> \ ghcr.io/utkuufuk/github-service/image:latest \ ./cli