Skip to content
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

fix: Fixed Comments on Bitbucket Data Center & Cloud #2015

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zakisk
Copy link
Contributor

@zakisk zakisk commented Mar 21, 2025

when PipelineRun finishes PAC creates final status as comment on Bitbucket Data Center and Cloud, but as Bitbucket (both) doesn't support HTML comment they were not being rendered as HTML rather they were only raw HTML string. in this PR markdown is used as formatting template to prettify comment on Bitbucket.

Fixes #1876 alongside

https://issues.redhat.com/browse/SRVKP-7331

Changes

Submitter Checklist

  • 📝 Ensure your commit message is clear and informative. Refer to the How to write a git commit message guide. Include the commit message in the PR body rather than linking to an external site (e.g., Jira ticket).

  • ♽ Run make test lint before submitting a PR to avoid unnecessary CI processing. Consider installing pre-commit and running pre-commit install in the repository root for an efficient workflow.

  • ✨ We use linters to maintain clean and consistent code. Run make lint before submitting a PR. Some linters offer a --fix mode, executable with make fix-linters (ensure markdownlint and golangci-lint are installed).

  • 📖 Document any user-facing features or changes in behavior.

  • 🧪 While 100% coverage isn't required, we encourage unit tests for code changes where possible.

  • 🎁 If feasible, add an end-to-end test. See README for details.

  • 🔎 Address any CI test flakiness before merging, or provide a valid reason to bypass it (e.g., token rate limitations).

  • If adding a provider feature, fill in the following details:

Git Provider Supported
GitHub App ❌️
GitHub Webhook ❌️
Gitea ❌️
GitLab ❌️
Bitbucket Cloud ✅️
Bitbucket Data Center ✅️

(update the documentation accordingly)

@osp-pac osp-pac added the e2e label Mar 25, 2025
@zakisk zakisk force-pushed the SRVKP-7331 branch 2 times, most recently from bd8ef57 to 97a64a0 Compare March 26, 2025 06:19
@chmouel
Copy link
Member

chmouel commented Apr 2, 2025

I was actually expecting another implementation from this PR, where you change the provider interface wiht a method like GetTemplate(type) and the provider itself will output whatever we want, so we don't have to do those if provider === "bitbucket" thing in the provider.GetCommentTamplate or mixing provider specific in the main code...

Let me know what do you think

@zakisk
Copy link
Contributor Author

zakisk commented Apr 3, 2025

I was actually expecting another implementation from this PR, where you change the provider interface wiht a method like GetTemplate(type) and the provider itself will output whatever we want, so we don't have to do those if provider === "bitbucket" thing in the provider.GetCommentTamplate or mixing provider specific in the main code...

Let me know what do you think

Ah, you're right it looks now more concise

`remeber-ok-to-test` setting is set to false by default to mitigate
security risks of enabling an attacker to gain trust of repo owner
and push malicious code.

fixes: openshift-pipelines#1876

https://issues.redhat.com/browse/SRVKP-7238

Signed-off-by: Zaki Shaikh <[email protected]>
@zakisk zakisk requested a review from aThorp96 April 3, 2025 17:11
Copy link
Contributor

@aThorp96 aThorp96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

bitbucket cloud output is broken
4 participants