Skip to content

fix(bitbucket): use body parameter on pull request updates #5457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2025

Conversation

mcwarman
Copy link
Member

@mcwarman mcwarman commented Jun 14, 2025

Fix #5445

Test

To test this pull request, you can run the following commands:

go build -o bin/updatecli
./bin/updatecli apply --config test.yaml
Config

# {{ $scmEnabled := and (env "BITBUCKET_REPOSITORY_OWNER") (env "BITBUCKET_REPOSITORY_NAME") }}
name: Test
pipelineid: test

targets:
  readme:
    name: Update readme
    kind: file
    disablesourceinput: true
    # {{ if $scmEnabled }}
    scmid: default
    # {{ end }}
    spec:
      file: README.md
      forceCreate: true
      content: "# New Title"

# {{ if $scmEnabled }}
scms:
  default:
    kind: bitbucket
    spec:
      owner: '{{ env "BITBUCKET_REPOSITORY_OWNER" }}'
      repository: '{{ env "BITBUCKET_REPOSITORY_NAME" }}'
      branch: main
      user: '{{ env "BITBUCKET_USERNAME" }}'
      email: '{{ env "BITBUCKET_EMAIL" }}'
      # {{ if (env "BITBUCKET_ACCESS_TOKEN") }}
      token: '{{ env "BITBUCKET_ACCESS_TOKEN" }}'
      # {{ else if (and (env "BITBUCKET_USERNAME") (env "BITBUCKET_APP_PASSWORD")) }}
      username: '{{ env "BITBUCKET_USERNAME" }}'
      password: '{{ env "BITBUCKET_APP_PASSWORD" }}'
      # {{ end }}
    disabled: false

actions:
  default:
    title: "Test Pull Request"
    kind: bitbucket/pullrequest
    spec:
      mergemethod: squash
      body: PR body new
    scmid: default
# {{ end }}

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

N/A

Potential improvement

N/A

@mcwarman mcwarman marked this pull request as ready for review June 16, 2025 07:37
@mcwarman mcwarman requested a review from olblak June 19, 2025 21:10
@olblak
Copy link
Member

olblak commented Jun 24, 2025

Thanks for the pullrequest.

I guess using the body parameter would prevent the pullrequest description to be automatically updated by Updatecli.
I am wondering if using something similar to the GitHub pullrequest where it's possible to add a pre-description would be useful.

@olblak olblak added the scm-bitbucket All things related to the bitbucket integration label Jun 24, 2025
@olblak olblak merged commit 7272f0a into updatecli:main Jun 25, 2025
6 checks passed
@olblak olblak added the bug Something isn't working label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scm-bitbucket All things related to the bitbucket integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bitbucket updates ignore body override
2 participants