Skip to content

Commit

Permalink
Azure DevOps now supports HTML in PR descriptions (#8628)
Browse files Browse the repository at this point in the history
While researching #6287 (comment),
I noticed that https://developercommunity.visualstudio.com/content/problem/608769/add-support-for-in-markdown.html
eventually leads to https://developercommunity.visualstudio.com/t/add-support-for-the-html-tag-in-markdown/609415#T-N1190213
which says that Azure ADO now supports the `<details>` tag in Markdown.

Furthermore, I suspect that ADO now fully supports HTML in PR
descriptions but it's not documented either way in https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/create?view=azure-devops-rest-7.0&tabs=HTTP#request-body.

So opening this PR as the simple solution. If ADO doesn't support HTML
but does support the `<details>` tag, then we'll unfortunately need a
more complex solution of refactoring things... but I hope not.

Fix #6453
  • Loading branch information
jeffwidman authored Dec 19, 2023
1 parent 961c875 commit ecb3cb6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def maintainer_changes_cascade
end

def build_details_tag(summary:, body:)
# Azure DevOps does not support <details> tag (https://developercommunity.visualstudio.com/content/problem/608769/add-support-for-in-markdown.html)
# Bitbucket does not support <details> tag (https://jira.atlassian.com/browse/BCLOUD-20231)
# CodeCommit does not support the <details> tag (no url available)
if source_provider_supports_html?
Expand Down Expand Up @@ -244,7 +243,7 @@ def break_tag
end

def source_provider_supports_html?
!%w(azure bitbucket codecommit).include?(source.provider)
!%w(bitbucket codecommit).include?(source.provider)
end

def sanitize_links_and_mentions(text, unsafe: false)
Expand Down

0 comments on commit ecb3cb6

Please sign in to comment.