Skip to content

Commit

Permalink
Rework the logical if when loading the projects
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
  • Loading branch information
alexsapran committed Mar 19, 2024
1 parent 2cb2431 commit 5c20f45
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .buildkite/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,13 @@ def pr_comment_pipeline(pr_comment: PRComment, yaml: YAML) -> list[Group]:
def main() -> None:
yaml = YAML(typ="safe")
all_groups = []
if is_pr() and not os.getenv("GITHUB_PR_TRIGGER_COMMENT"):
all_groups = fetch_pr_pipeline(yaml)

if is_pr() and os.getenv("GITHUB_PR_TRIGGER_COMMENT"):
comment = PRComment(os.getenv("GITHUB_PR_TRIGGER_COMMENT"))
all_groups = pr_comment_pipeline(comment, yaml)
if is_pr():
if os.getenv("GITHUB_PR_TRIGGER_COMMENT"):
comment = PRComment(os.getenv("GITHUB_PR_TRIGGER_COMMENT"))
all_groups = pr_comment_pipeline(comment, yaml)
else:
all_groups = fetch_pr_pipeline(yaml)
# TODO what to load when not in PR

# Produce the dynamic pipeline
print(
Expand Down

0 comments on commit 5c20f45

Please sign in to comment.