mirror of
https://github.com/Sea-Haven-Industries/review-policy-test.git
synced 2026-08-04 17:26:13 +00:00
Add boilerplate, CI caller, and point review gate at test team
Adds a minimal Python module + .gitignore + a ci.yaml caller (ci-python-app) so the repo emits ci / ci like a real repo, and switches the required-review caller to the throwaway review-test-approvers team so the live luby / internal-dev teams are not involved during validation.
This commit is contained in:
parent
799d315ed5
commit
5092cd7f27
4 changed files with 52 additions and 1 deletions
17
.github/workflows/ci.yaml
vendored
Normal file
17
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
name: CI
|
||||
|
||||
# Test CI for the review-policy test repo. Calls the org reusable Python-app CI
|
||||
# so this repo emits the `ci / ci` status check, the same way a real repo does —
|
||||
# letting us validate how the required-review gate coexists with another required
|
||||
# check under branch protection. `collect-only: false` skips the pytest job (this
|
||||
# repo has no requirements.txt); the lint job (ruff + conventions) is enough.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main, dev]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
uses: Sea-Haven-Industries/.github/.github/workflows/ci-python-app.yaml@main
|
||||
with:
|
||||
collect-only: false
|
||||
4
.github/workflows/required-review.yml
vendored
4
.github/workflows/required-review.yml
vendored
|
|
@ -21,7 +21,9 @@ jobs:
|
|||
required-review:
|
||||
uses: Sea-Haven-Industries/.github/.github/workflows/callable-required-review.yaml@feat/required-review-workflow
|
||||
with:
|
||||
all-of-teams: "luby,internal-dev"
|
||||
# Test team (just Adam) so the real luby / internal-dev teams are not
|
||||
# involved while validating. Switch to "luby,internal-dev" for production.
|
||||
all-of-teams: "review-test-approvers"
|
||||
secrets:
|
||||
app_id: ${{ secrets.REVIEW_POLICY_APP_ID }}
|
||||
app_private_key: ${{ secrets.REVIEW_POLICY_APP_PRIVATE_KEY }}
|
||||
|
|
|
|||
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
.venv/
|
||||
venv/
|
||||
|
||||
# Secrets / local config
|
||||
.env
|
||||
.env.*
|
||||
|
||||
# OS / editor
|
||||
.DS_Store
|
||||
20
app.py
Normal file
20
app.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"""Boilerplate module for the review-policy test repo.
|
||||
|
||||
This repo exists only to validate the multi-team required-review workflow and the
|
||||
branch-protection rulesets before they are applied to the real shoc repos. It is
|
||||
disposable and will be deleted once the gate is confirmed working.
|
||||
"""
|
||||
|
||||
|
||||
def greet(name: str) -> str:
|
||||
"""Return a friendly greeting for the given name."""
|
||||
return f"Hello, {name}!"
|
||||
|
||||
|
||||
def add(a: int, b: int) -> int:
|
||||
"""Return the sum of two integers."""
|
||||
return a + b
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(greet("review-policy"))
|
||||
Loading…
Add table
Reference in a new issue