Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket ChatGPT integration - Diff between commits

Nitzan Horovitz December 17, 2024

Hello,

 

I recently integrated the bitbucket-chatgpt-codereview:0.1.3 pipeline into one of our repositories.

From my understanding, the agent submits to OpenAI the diff between two branches. Therefore, when a PR is created, the diff includes all changes relative to the destination branch. Moreover, if I update the source branch and push a new commit, it appears that the diff still reflects the total changes relative to the destination branch, rather than just the differences from the previous commit. Is my understanding correct?

Given this, is there a way to configure the pipeline to send only the diffs between commits? Sending the entire code base again could be costly.

Alternatively, could we set up the pipeline to run only once when a PR is initially opened, or enable it to be triggered manually?

I appreciate your guidance on optimizing our pipeline configuration to reduce costs and improve efficiency.

 

Best regards,

Nitzan

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2024

Hi Nitzan,

I haven't been involved with pipes development, so I can't answer your first question. The developers of Atlassian pipes monitor community questions, so one of them should be able to answer your question about the diff.

I just wanted to address this question:

Alternatively, could we set up the pipeline to run only once when a PR is initially opened, or enable it to be triggered manually?

As far as I can see, this pipe runs only on PRs, so pull-request start condition should be present in bitbucket-pipelines.yml file.

With a pull-requests definition, this pipeline will run every time you open or update the PR, unless the text [skip ci] is added to the commit message of the last commit of the PR's source branch.

Please keep in mind that if you have a default pipeline, a branches pipeline for the PR's source branch, or a tags pipeline, the [skip ci] text in the commit message means that these will be skipped as well.

If this is ok for you, you can ask your developers to include [skip ci] in the commit messages of the source branch so that the build won't get triggered.

If you want the PR pipeline to get triggered later on, you can omit [skip ci] from the commit message. If you forget to omit it, you can check the following knowledge base article with two suggestions on how to manually trigger a PR pipeline:

Please feel free to let me know if you have any questions!

Kind regards,
Theodora

Nitzan Horovitz December 26, 2024

thank you very much Theodora! i voted for this and following the ticket

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2024

You are very welcome, Nitzan!

I reached out to the pipes team regarding your first question. This pipe runs on pull-requests builds only and it always reviews all diff files from the PR diff. The only way to limit this is by using the FILES_TO_REVIEW variable. There is no way to configure the pipe to review only files changed since the last run on the same PR.

I created a feature request for what you asked, you can add your vote to it to express your interest:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events