Answer security round 1: 0 🔴, 0 🟡 (0 misread); refuse a malformed epic key and a comment that starts with a dash
CI / tests (pull_request) Successful in 3m44s
CI / tests (pull_request) Successful in 3m44s
This commit is contained in:
@@ -120,6 +120,7 @@ from git_cli.git_repo import CHUNK_BASE
|
||||
from git_cli import epic_branch
|
||||
from failure import Failure
|
||||
from forge.commands import Forge, forge_of, gitea, Run, runner
|
||||
from atlassian.jira import ISSUE_KEY
|
||||
from project_config.main import located
|
||||
from project_config.settings import ProjectConfig
|
||||
from plan_store.plans import says_no_item
|
||||
@@ -385,6 +386,8 @@ def review_asked(forge: Forge, number: str, run: Run, config: Config) -> str | N
|
||||
|
||||
def epic_opened(epic: str, title: str, body: str, run: Run, config: Config) -> str | Failure:
|
||||
"""Bring the working branch of the epic with the key epic level with origin's default branch, then open its pull request into that branch, ready, for a person to merge."""
|
||||
if not ISSUE_KEY.fullmatch(epic):
|
||||
return Failure(f"{epic!r} is no epic's key, such as ABC-123")
|
||||
loaded = config()
|
||||
if isinstance(loaded, Failure):
|
||||
return loaded
|
||||
|
||||
Reference in New Issue
Block a user