Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If no scannable content found in default branch, additional branches specified in targets.json are not attempted[🐛] #486

Open
kkasper18 opened this issue May 28, 2024 · 0 comments

Comments

@kkasper18
Copy link

./run_targets_emu.out:2024-05-28 19:58:00 | INFO | tasks.targets:generate_targets_for_repository:88 - [probono-microsite] Import file specified branches, using those..

import json
f = open('targets.json')
targets=json.load(f)
for t in targets['targets']:
... if t['target']['name'] == 'probono-microsite':
... print(t)
... print()
...
{'orgId': '90cde499-8dbe-482e-aba2-ed76b1426d15', 'integrationId': '140f3713-7c89-405e-b347-16d469fff5c6', 'target': {'fork': False, 'owner': 'massmutual-git', 'name': 'probono-microsite', 'branch': 'develop'}}

{'orgId': '90cde499-8dbe-482e-aba2-ed76b1426d15', 'integrationId': '140f3713-7c89-405e-b347-16d469fff5c6', 'target': {'fork': False, 'owner': 'massmutual-git', 'name': 'probono-microsite', 'branch': 'qa'}}

{'orgId': '90cde499-8dbe-482e-aba2-ed76b1426d15', 'integrationId': '140f3713-7c89-405e-b347-16d469fff5c6', 'target': {'fork': False, 'owner': 'massmutual-git', 'name': 'probono-microsite', 'branch': 'main'}}

image

Expected behaviour

Despite no scannable content in default (main) branch (yet), import should continue with non-default branches that do have scannable content at this point.

Actual behaviour

Import sees no scannable content in default branch and does not attempt the non-default target repositories.

Steps to reproduce

Create a repository with a default branch that holds no scannable content
Create a new branch that does have scannable content
Execute import against these targets
Observe that only the default branch is attempted

Debug log

If applicable, please add DEBUG=*snyk* <command here> before your command and include the output here **ensuring to remove any sensitive/personal details or tokens.

Screenshots

If applicable, add screenshots to help explain your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant