Skip to content

Commit

Permalink
on push: use final path component as head_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Jan 10, 2025
1 parent dd4412b commit df04ca0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ci_relay/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ async def handle_push(
data["repository"]["full_name"],
)

head_ref = data["ref"].split("/")[-1]

await cancel_pipelines_if_redundant(
gl=gl, head_ref=data["ref"], clone_url=data["repository"]["clone_url"]
gl=gl, head_ref=head_ref, clone_url=data["repository"]["clone_url"]
)

await trigger_pipeline(
Expand All @@ -277,7 +279,7 @@ async def handle_push(
session=session,
clone_url=data["repository"]["clone_url"],
installation_id=data["installation"]["id"],
head_ref=data["ref"],
head_ref=head_ref,
)


Expand Down

0 comments on commit df04ca0

Please sign in to comment.