Skip to content

Commit

Permalink
Option config_hg_for_dev...
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Sep 26, 2023
1 parent ce5e983 commit ada2a2d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/galaxy/config/schemas/tool_shed_config_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ mapping:
Where the hgweb.config file is stored.
The default is the Galaxy installation directory.
config_hg_for_dev:
type: str
required: false
desc: |
Allow pushing directly to mercurial repositories directly
and without authentication.
file_path:
type: str
default: database/community_files
Expand Down
6 changes: 5 additions & 1 deletion lib/tool_shed/util/hg_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def create_hgrc_file(app, repository):
fp.write("default = .\n")
fp.write("default-push = .\n")
fp.write("[web]\n")
fp.write(f"allow_push = {repository.user.username}\n")
if app.config.config_hg_for_dev:
allow_push = "*"
else:
allow_push = repository.user.username
fp.write(f"allow_push = {allow_push}\n")
fp.write(f"name = {repository.name}\n")
fp.write("push_ssl = false\n")
fp.write("[extensions]\n")
Expand Down
1 change: 1 addition & 0 deletions test/unit/tool_shed/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class TestToolShedConfig:
file_path: str
id_secret: str = "thisistheshedunittestsecret"
smtp_server: Optional[str] = None
config_hg_for_dev = False

def __init__(self, temp_directory):
files_path = os.path.join(temp_directory, "files")
Expand Down

0 comments on commit ada2a2d

Please sign in to comment.