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

Remove ansi control chars from PR comment message #1231

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

jmrt47
Copy link
Contributor

@jmrt47 jmrt47 commented Jul 18, 2024

Pulumi action used with color: always output and comment-on-pr: true lead to ANSI control characters in the Pull Request comment. Reported in #1229 check for details.

Special thanks to @bennettp123 who had the idea, converting the output from ansi to html and add html to the comment. I picked up the idea propsed in #859.

Changes proposed in this PR:

  • Convert output from ansi to html and add html as a comment
  • Add config to specifiy the maximum length of the PR comment output

@jmrt47 jmrt47 marked this pull request as ready for review July 18, 2024 20:04
@jmrt47 jmrt47 requested a review from a team as a code owner July 18, 2024 20:04
Copy link
Contributor

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

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

Thanks for getting this started! I left a few comments inline.

src/libs/__tests__/pr.test.ts Outdated Show resolved Hide resolved
src/libs/pr.ts Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
} = config;

// GitHub limits comment characters to 65535, use lower max to keep buffer for variable values
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ thanks for documenting this!

@tgummerer tgummerer merged commit 4cda3e9 into pulumi:main Jul 24, 2024
76 checks passed
@pulumi-bot
Copy link

This PR has been shipped in release v5.4.0.

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

Successfully merging this pull request may close these issues.

3 participants