Skip to content
This repository was archived by the owner on Aug 10, 2026. It is now read-only.

Commit 72b0bd9

Browse files
author
Hock-ptooey!
authored
Merge pull request #58 from readme-SVG/upload-repo-governance-1775834663664
Import YAML helpers for repository governance
2 parents 271f9ca + a4298c6 commit 72b0bd9

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

trigger action/trigger_action.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,9 @@
8888
commit_sha = os.environ.get("COMMIT_SHA")
8989
commit = repo.get_commit(commit_sha)
9090

91-
if len(commit.parents) > 1:
92-
exit(0)
93-
if not commit.author:
94-
exit(0)
95-
96-
author_login = commit.author.login.strip().lower()
97-
if author_login not in allowed_users:
91+
actor_login = os.environ.get("GITHUB_ACTOR", "").strip().lower()
92+
if actor_login not in allowed_users:
93+
print(f"Action performed by {actor_login}, not in allowed list. Skipping.")
9894
exit(0)
9995

10096
pr_match = re.search(r'\(#(\d+)\)', commit.commit.message)
@@ -475,7 +471,8 @@ def call_model(prompt: str, retries: int = 3, delay: int = 5) -> dict:
475471
else:
476472
issue_body = result["issue_body"].replace("PUT_PERMALINK_HERE", "_No specific file identified_")
477473

478-
footer = f"\n\n---\n*Generated from {dedup_key} | Auto-detected role: `{role_key}`*"
474+
actor_name = os.environ.get("GITHUB_ACTOR", "unknown")
475+
footer = f"\n\n---\n*Generated from {dedup_key} | Auto-detected role: `{role_key}` | Processed by actor: {actor_name}*"
479476

480477
severity = result.get("severity", "medium").lower()
481478
severity_label_map = {

0 commit comments

Comments
 (0)