Skip to content

Conversation

@Stummi
Copy link
Contributor

@Stummi Stummi commented Apr 10, 2025

Type of Change

  • Bugfix
  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

The list of items to show in the slack message is now split into chunks with 5 items each. This allows us to stay within the documented limit of 3000 characters for individual sections in a box kit slack message

Checklist

  • Update documentation
  • Review the Contributing Guideline and sign CLA
  • Reference relevant issue(s) and close them after merging

@Stummi Stummi added the hackathon Pull requests that are related to Hackathon label Apr 10, 2025
@Stummi Stummi requested a review from a team as a code owner April 10, 2025 11:10
Comment on lines +124 to +131
occurrences_by_ann_path: Dict[str, List[Occurrence]] = {}
for o in occurrences:
occurrences_by_ann_path.setdefault(o.annotation_path, []).append(o)
items = [i for i in occurrences_by_ann_path.items()]
items.sort(key=lambda i: len(i[1]), reverse=True) # sort by number of occurrences, highest first

limit = 12
items = items[:limit]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The diff is a bit weird here. These lines did not change at all. The definition of the json structure and this code block has just been swapped in the code

Comment on lines +161 to +162
data = {
"channel": state.slack_channel,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of working with a static string and doing replacements there, we now have a data structure that gets serialized to json later

@Stummi Stummi requested review from Copilot and flaxel April 10, 2025 11:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

find_flaky_tests.py:147

  • [nitpick] The iteration variable 'i' is ambiguous; consider renaming it to 'index' for improved clarity.
content += " ".join([f"<{occr.check_url}|{i+1}> " for i, occr in enumerate(recent_occrs)])

find_flaky_tests.py:182

  • [nitpick] Consider renaming the variable 'json' to something more descriptive (e.g., 'json_message') to avoid shadowing the built-in json module.
json = json_lib.dumps(data, indent=4)

@Stummi Stummi merged commit 4ac7dd9 into main Apr 10, 2025
5 checks passed
@Stummi Stummi deleted the chunk-slack-message branch April 10, 2025 12:20
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hackathon Pull requests that are related to Hackathon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants