Merge branch 'feature/git_pull' into 'mgx_ops'

feat: create_pull_url

See merge request pub/MetaGPT!97
This commit is contained in:
林义章 2024-05-11 07:28:48 +00:00
commit 476e6256a7
3 changed files with 93 additions and 28 deletions

View file

@ -154,8 +154,12 @@ async def git_create_pull(
>>> body=body,
>>> access_token=access_token,
>>> )
>>> print(pr)
>>> if isinstance(pr, PullRequest):
>>> print(pr)
PullRequest("feat: modify http lib")
>>> if isinstance(pr, str):
>>> print(f"Visit this url to create a new pull request: '{pr}'")
Visit this url to create a new pull request: 'https://github.com/iorisa/snake-game/compare/master...feature/new'
>>> # create pull request
>>> base_repo_name = "geekan/MetaGPT"
@ -175,9 +179,12 @@ async def git_create_pull(
>>> body=body,
>>> access_token=access_token,
>>> )
>>> print(pr)
>>> if isinstance(pr, PullRequest):
>>> print(pr)
PullRequest("feat: modify http lib")
>>> if isinstance(pr, str):
>>> print(f"Visit this url to create a new pull request: '{pr}'")
Visit this url to create a new pull request: 'https://github.com/geekan/MetaGPT/compare/master...iorisa:MetaGPT:feature/http'
Returns:
PullRequest: The created pull request.