(self, branches: Sequence[str], force: bool = False)
| 1926 | return title, pr_body |
| 1927 | |
| 1928 | def _git_push(self, branches: Sequence[str], force: bool = False) -> None: |
| 1929 | assert branches, "empty branches would push master, probably bad!" |
| 1930 | try: |
| 1931 | self.sh.git( |
| 1932 | "push", |
| 1933 | self.remote_name, |
| 1934 | "--no-verify", |
| 1935 | *(["--force"] if force else []), |
| 1936 | *branches, |
| 1937 | ) |
| 1938 | except RuntimeError as e: |
| 1939 | remote_url = self.sh.git("remote", "get-url", "--push", self.remote_name) |
| 1940 | if remote_url.startswith("https://"): |
| 1941 | raise RuntimeError( |
| 1942 | "[E001] git push failed, probably because it asked for password " |
| 1943 | "(scroll up to see original error). " |
| 1944 | "Change your git URL to use SSH instead of HTTPS to enable passwordless push. " |
| 1945 | "See https://github.com/ezyang/ghstack/wiki/E001 for more details." |
| 1946 | ) from e |
| 1947 | raise |
| 1948 | self.github.push_hook(branches) |
| 1949 | |
| 1950 | |
| 1951 | def run_pre_ghstack_hook( |
no test coverage detected