TestRail Deduplication: matrix strategy, BQ tracking, and Slack notifications#323
Open
TestRail Deduplication: matrix strategy, BQ tracking, and Slack notifications#323
Conversation
…to Python script - Move TESTRAIL_HOST/USERNAME/PASSWORD env vars from job level to the fetch step only, limiting credential exposure to the single step that needs them - Replace inline shell/Python BigQuery insertion with insert_bq_stats.py, eliminating JSON injection risk from shell string interpolation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
isabelrios
reviewed
Apr 23, 2026
|
|
||
| - name: Build Slack payloads | ||
| run: | | ||
| python3 << 'PYEOF' |
Collaborator
There was a problem hiding this comment.
Wondering if we could move things like this to separate files to not have this long github action and specific scripts are isolated rather than in the action themselves
Collaborator
Author
There was a problem hiding this comment.
Yes, I moved this into a separate python file
isabelrios
reviewed
Apr 23, 2026
| print("="*60) | ||
|
|
||
| if __name__ == "__main__": | ||
| import argparse |
Collaborator
There was a problem hiding this comment.
Should not this live above with the rest of imports?
isabelrios
reviewed
Apr 23, 2026
| import re | ||
| import unicodedata | ||
| from difflib import SequenceMatcher | ||
|
|
Collaborator
There was a problem hiding this comment.
Nit: space either above or remove
Collaborator
Author
There was a problem hiding this comment.
Removed the space
isabelrios
reviewed
Apr 23, 2026
| ## FAQs | ||
|
|
||
| ### Q: Which test should I keep if they're all identical? | ||
| **A:** Keep the one with the **lowest Case ID** (e.g., C2575167 instead of C3193560). The lowest ID is usually the original test, and higher IDs are copies. |
Collaborator
There was a problem hiding this comment.
Not sure about that.. I will keep the one that is linked in githug to avoid creating a PR just to modify the link
Replaces the PYEOF heredoc in the workflow with a proper Python script, keeping the YAML clean and making the logic testable independently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t-priority-list.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
isabelrios
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the github actions to run the a local model to find test duplications from a test rail export.
testrail_deduplication_runstable records weekly stats per project; workflow queries previous week's data to compute deltasinsert_bq_stats.py: reads output CSVs safely, writes stats toGITHUB_ENV, inserts into BigQuery — replaces brittle inline Python/shell in YAML