How to use the ghstack.land.main function in ghstack

To help you get started, we’ve selected a few ghstack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ezyang / ghstack / test_ghstack.py View on Github external
def gh_land(self, pull_request: str) -> None:
        return ghstack.land.main(
            pull_request=pull_request,
            github=self.github,
            sh=self.sh
        )
github ezyang / ghstack / ghstack / __main__.py View on Github external
msg=args.message,
                username=conf.github_username,
                sh=sh,
                github=github,
                update_fields=args.update_fields,
                short=args.short,
                force=args.force,
                no_skip=args.no_skip,
            )
        elif args.cmd == 'unlink':
            ghstack.unlink.main(
                commits=args.COMMITS,
                sh=sh,
            )
        elif args.cmd == 'land':
            ghstack.land.main(
                pull_request=args.pull_request,
                github=github,
                sh=sh,
            )
        elif args.cmd == 'action':
            ghstack.action.main(
                pull_request=args.pull_request,
                github=github,
                sh=sh,
                close=args.close,
            )
        elif args.cmd == 'status':
            # Re-read conf and request circle token if not available
            # TODO: Restructure this so that we just request
            # configurations "on-demand" rather than all upfront
            conf = ghstack.config.read_config(request_circle_token=True)