Skip to content

Commit

Permalink
lava_callback: Drop strict branch name checking in /checkout endpoint
Browse files Browse the repository at this point in the history
Function "find_tree" verifies tree existence in the Pipeline config but
branch for "/checkout" request is taken from user's input.

This patch uses less strict check to allow checkouts from branches
absent in the static Pipeline config.

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
  • Loading branch information
pawiecz authored and nuclearcat committed Feb 17, 2025
1 parent cf6e172 commit 1d08975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lava_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def find_tree(url, branch):

for bconfig in YAMLCFG['build_configs']:
data = YAMLCFG['build_configs'].get(bconfig)
if data.get('tree') == treename and data.get('branch') == branch:
if data.get('tree') == treename:
return treename

return None
Expand Down

0 comments on commit 1d08975

Please sign in to comment.