mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
6fde922876
Summary:
D42614252 (79886f53d4
) introduced a way of setting `default.default-push` through the `SL_TEST_GH_URL` environment variable in tests. This diff makes use of the same environment variable for `github.submit.get_origin`.
This can be useful when testing commands that need to connect to the mock GitHub server but still need to get data from the git repo being tested.
Reviewed By: bolinfest
Differential Revision: D42625037
fbshipit-source-id: bf19d772fef32bf4ce8326391a9df360a3412040
27 lines
752 B
Perl
27 lines
752 B
Perl
#chg-compatible
|
|
#debugruntest-compatible
|
|
#inprocess-hg-incompatible
|
|
|
|
$ enable github
|
|
$ export SL_TEST_GH_URL=https://github.com/facebook/test_github_repo.git
|
|
$ . $TESTDIR/git.sh
|
|
|
|
build up a github repo
|
|
|
|
$ sl init --git repo1
|
|
$ cd repo1
|
|
$ setconfig github.placeholder-strategy=True
|
|
$ echo a > a1
|
|
$ sl ci -Am addfile
|
|
adding a1
|
|
|
|
confirm it is a 'github_repo'
|
|
$ sl log -r. -T '{github_repo}\n'
|
|
True
|
|
|
|
test sending pr
|
|
$ sl pr submit --config extensions.pr_submit=$TESTDIR/github/mock_create_one_pr_placeholder_issue.py
|
|
pushing 1 to https://github.com/facebook/test_github_repo.git
|
|
created new pull request: https://github.com/facebook/test_github_repo/pull/1
|
|
updated body for https://github.com/facebook/test_github_repo/pull/1
|