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

Use "concise" diff comment in cases "regular" diff comment is > 65536 #20

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

Oded-B
Copy link
Collaborator

@Oded-B Oded-B commented Aug 6, 2024

Description

This pull request introduces several improvements to the handling and logging of ArgoCD diff comments, including the addition of a concise template for large comments, and refactoring of error logging. The most important changes include defining a constant for the maximum GitHub comment size, adding logic to handle large diff comments, and creating a concise template for such comments.

Improvements to handling large diff comments:

Enhancements to logging:

  • internal/pkg/githubapi/github.go: Refactored error logging to use ghPrClientDetails.PrLogger instead of the global log object for more consistent and contextual logging.

New concise template:

  • templates/argoCD-diff-pr-comment-concise.gotmpl: Created a new concise template for ArgoCD diff comments that are too large to fit within the GitHub comment size limit.
    Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to related issues, other PRs, or technical references.

Example of concise image:
image

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@Oded-B Oded-B marked this pull request as ready for review August 6, 2024 08:35
@Oded-B Oded-B merged commit 9ab1dd8 into main Aug 6, 2024
5 checks passed
@hnnsgstfssn hnnsgstfssn deleted the fix_comment_too_bix branch January 14, 2025 20:57
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.

2 participants