Skip to content

Commit

Permalink
Merge pull request #521 from Codium-ai/tr/bitbucket_app
Browse files Browse the repository at this point in the history
feat: Enable PR description publishing as comment in bitbucket_app.py
  • Loading branch information
mrT23 authored Dec 12, 2023
2 parents 1853b4e + 77a6faf commit 648dd32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ auto_improve = true # set as config var in .pr_agent.toml
`bitbucket_app.auto_review`, `bitbucket_app.auto_describe` and `bitbucket_app.auto_improve` are used to enable/disable automatic tools.
If not set, the default option is that only the `review` tool will run automatically when a new PR is opened.

Note that due to limitations of the bitbucket platform, the `auto_describe` tool will be able to publish a PR description only as a comment.
In addition, some subsections like `PR changes walkthrough` will not appear, since they require the usage of collapsible sections, which are not supported by bitbucket.

### Changing a model

See [here](pr_agent/algo/__init__.py) for the list of available models.
Expand Down
1 change: 1 addition & 0 deletions pr_agent/servers/bitbucket_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async def handle_uninstalled_webhooks(request: Request, response: Response):
def start():
get_settings().set("CONFIG.PUBLISH_OUTPUT_PROGRESS", False)
get_settings().set("CONFIG.GIT_PROVIDER", "bitbucket")
get_settings().set("PR_DESCRIPTION.PUBLISH_DESCRIPTION_AS_COMMENT", True)
middleware = [Middleware(RawContextMiddleware)]
app = FastAPI(middleware=middleware)
app.include_router(router)
Expand Down

0 comments on commit 648dd32

Please sign in to comment.