Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions brainscore_core/plugin_management/handle_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ def main():
help="Domain type (currently only 'vision' is supported)")
parser.add_argument("--db-connection", action="store_true", default=False,
help="If provided, establish a new database connection")
parser.add_argument("--skip-pr", action="store_true", default=False,
help="If provided, skip PR creation and output metadata path instead")
args = parser.parse_args()

new_metadata = False
Expand Down Expand Up @@ -300,9 +302,14 @@ def main():
create_endpoint = MetadataEndpoint(domain_plugins=domain_plugin, db_secret=db_secret)
create_endpoint(plugin_dir=args.plugin_dir, plugin_type=args.plugin_type, domain=args.domain)

if new_metadata: # if metadata was created, create a pr that will be automerged and approved by github actions
pr_number = create_metadata_pr(args.plugin_dir)
print(pr_number)
if new_metadata:
if args.skip_pr:
# Output the metadata path for the workflow to collect
print(metadata_path)
else:
# Create a PR that will be automerged and approved by github actions
pr_number = create_metadata_pr(args.plugin_dir)
print(pr_number)
else:
print("")

Expand Down