Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
896 changes: 711 additions & 185 deletions README.md

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions docker-compose-example.yaml

This file was deleted.

96 changes: 96 additions & 0 deletions examples/.github-webhook-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Example .github-webhook-server.yaml
# This file should be placed in the root of your repository to configure
# repository-specific webhook server behavior.

# Logging configuration (overrides global settings)
log-level: DEBUG # Options: INFO, DEBUG
log-file: /path/to/repository-specific.log

# Slack integration
slack_webhook_url: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK

# Job verification settings
verified_job: true # Enable/disable verified job functionality

# PyPI publishing configuration
pypi:
token: pypi-your-token-here

# GitHub events to listen to
events:
- push
- pull_request
- issue_comment
- check_run
- pull_request_review
- pull_request_review_comment

# Tox configuration
tox:
main: "tests,linting" # Commands for main branch
develop: "tests" # Commands for develop branch
feature/*: ["tests", "quick-lint"] # Array format also supported

# Python version for tox execution
tox-python-version: "3.11"

# Pre-commit hooks
pre-commit: true

# Protected branches configuration
protected-branches:
main: [] # No additional requirements
develop:
include-runs:
- "Required CI Check"
exclude-runs:
- "Optional Check"
release/*: ["Required Release Check"]

# Container/Docker configuration
container:
username: your-registry-username
password: your-registry-password # pragma: allowlist secret
repository: quay.io/your-org/your-repo
tag: latest
release: true # Push on new releases
build-args:
- "BUILD_ARG=value"
args:
- "--platform=linux/amd64"

# Auto-verified and merged users (repository-specific)
auto-verified-and-merged-users:
- "renovate[bot]"
- "dependabot[bot]"
- "trusted-user"

# Repository-specific GitHub tokens
github-tokens:
- ghp_your_repository_specific_token_here

# Branch protection rules
branch_protection:
strict: true
require_code_owner_reviews: true
dismiss_stale_reviews: true
required_approving_review_count: 2
required_linear_history: false
required_conversation_resolution: true

# Auto-merge configuration
set-auto-merge-prs:
- main
- develop

# Required labels for merge
can-be-merged-required-labels:
- "approved"
- "tests-passed"
- "security-reviewed"

# Conventional commit configuration
conventional-title: "feat,fix,docs,style,refactor,test,chore"

# Minimum LGTM count required
minimum-lgtm: 2
3 changes: 3 additions & 0 deletions example.config.yaml → examples/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
log-level: INFO # Set global log level, change take effect immediately without server restart
log-file: webhook-server.log # Set global log file, change take effect immediately without server restart

# Server configuration
disable-ssl-warnings: true # Disable SSL warnings (useful in production to reduce log noise from SSL certificate issues)

github-app-id: 123456 # GitHub app id
github-tokens:
- <GITHIB TOKEN1>
Expand Down
42 changes: 21 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.coverage.run]
omit = [ "tests/*" ]
omit = ["webhook_server/tests/*"]

[tool.coverage.report]
fail_under = 35
Expand All @@ -14,8 +14,8 @@ line-length = 120
fix = true
output-format = "grouped"

[tool.ruff.format]
exclude = [ ".git", ".venv", ".mypy_cache", ".tox", "__pycache__" ]
[tool.ruff.format]
exclude = [".git", ".venv", ".mypy_cache", ".tox", "__pycache__"]

[tool.mypy]
check_untyped_defs = true
Expand All @@ -31,10 +31,10 @@ warn_unused_configs = true
warn_redundant_casts = true

[tool.hatch.build.targets.wheel]
packages = [ "webhook_server" ]
packages = ["webhook_server"]

[tool.uv]
dev-dependencies = [ "ipdb>=0.13.13", "ipython>=8.12.3" ]
dev-dependencies = ["ipdb>=0.13.13", "ipython>=8.12.3"]

[project]
name = "github-webhook-server"
Expand All @@ -45,7 +45,7 @@ readme = "README.md"
license = "Apache-2.0"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent"
"Operating System :: OS Independent",
]
dependencies = [
"build>=1.2.2.post1",
Expand All @@ -66,26 +66,26 @@ dependencies = [
"timeout-sampler>=0.0.46",
"uvicorn>=0.31.0",
"httpx>=0.28.1",
"asyncstdlib>=3.13.1"
"asyncstdlib>=3.13.1",
]

[[project.authors]]
name = "Meni Yakove"
email = " myakove@gmail.com"
[[project.authors]]
name = "Meni Yakove"
email = " myakove@gmail.com"

[[project.authors]]
name = "Ruth Netser"
email = "ruth.netser@gmail.com"
[[project.authors]]
name = "Ruth Netser"
email = "ruth.netser@gmail.com"

[project.urls]
homepage = "https://github.com/myakove/github-webhook-server"
repository = "https://github.com/myakove/github-webhook-server"
Download = "https://quay.io/repository/myakove/github-webhook-server"
"Bug Tracker" = "https://github.com/myakove/github-webhook-server/issues"
[project.urls]
homepage = "https://github.com/myakove/github-webhook-server"
repository = "https://github.com/myakove/github-webhook-server"
Download = "https://quay.io/repository/myakove/github-webhook-server"
"Bug Tracker" = "https://github.com/myakove/github-webhook-server/issues"

[project.optional-dependencies]
tests = [ "pytest-asyncio>=0.26.0" ]
[project.optional-dependencies]
tests = ["pytest-asyncio>=0.26.0"]

[build-system]
requires = [ "hatchling" ]
requires = ["hatchling"]
build-backend = "hatchling.build"
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[pytest]
asyncio_mode = auto
addopts =
--pdbcls=IPython.terminal.debugger:TerminalPdb
--cov-config=pyproject.toml --cov-report=html --cov-report=term --cov=webhook_server
Expand Down
2 changes: 1 addition & 1 deletion tox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands = [
[
"pyutils-unusedcode",
"--exclude-function-prefixes",
"'process_webhook'",
"'process_webhook','validate_config_file'",
],
]

Expand Down
Loading