Skip to content

Commit a6755e0

Browse files
committed
hide tokens in Git Backends automatically, push to repository
1 parent 359379b commit a6755e0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

conda_forge_tick/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ def create_pull_request(
10621062
"base": GithubPullRequestBase(repo=GithubRepository(name=target_repo)),
10631063
}
10641064
)
1065-
1065+
10661066
def comment_on_pull_request(
10671067
self, repo_owner: str, repo_name: str, pr_number: int, comment: str
10681068
):

tests/test_git_utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,16 @@ def github_response_headers() -> dict:
10801080
return _github_api_json_fixture("github_response_headers")
10811081

10821082

1083+
def test_git_platform_backend_get_remote_url_token():
1084+
owner = "OWNER"
1085+
repo = "REPO"
1086+
token = "TOKEN"
1087+
1088+
url = GitPlatformBackend.get_remote_url(owner, repo, GitConnectionMode.HTTPS, token)
1089+
1090+
assert url == f"https://{token}@github.com/{owner}/{repo}.git"
1091+
1092+
10831093
def test_github_backend_from_token():
10841094
token = "TOKEN"
10851095

0 commit comments

Comments
 (0)