Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions src/taskgraph/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,16 +912,14 @@ def init_taskgraph(options):

if repo.tool == "git" and "github.com" in repo_url:
context["repo_host"] = "github"
elif repo.tool == "hg" and "hg.mozilla.org" in repo_url:
context["repo_host"] = "hgmo"
else:
print(
dedent(
"""\
Repository not supported!

Taskgraph only supports repositories hosted on Github or hg.mozilla.org.
Ensure you have a remote that points to one of these locations.
The `taskgraph init` command only supports repositories hosted on
Github. Ensure you use a remote that points to a Github repository.
"""
),
file=sys.stderr,
Expand Down
2 changes: 1 addition & 1 deletion template/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "my-project",
"taskgraph_version": "{{ cookiecutter.taskgraph_version }}",
"repo_host": ["github", "hgmo"],
"repo_host": ["github"],
"repo_name": "my-repo",
"project_slug": "{{ cookiecutter.repo_name.lower().replace(' ', '_').replace('-', '_') }}",
"trust_domain": "mozilla",
Expand Down
225 changes: 0 additions & 225 deletions template/{{cookiecutter.project_name}}/taskcluster.hgmo.yml

This file was deleted.

7 changes: 6 additions & 1 deletion test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,15 @@ def test_init_taskgraph(mocker, tmp_path, project_root, repo_with_upstream):
oldcwd = Path.cwd()
try:
os.chdir(repo_root)
taskgraph_main(["init", "--template", str(project_root)])
ret = taskgraph_main(["init", "--template", str(project_root)])
finally:
os.chdir(oldcwd)

if repo.tool == "hg":
assert ret == 1
assert not (repo_root / ".taskcluster.yml").exists()
return

# Make assertions about the repository state.
expected_files = [
".taskcluster.yml",
Expand Down
Loading