chore(pr-comments): generalization for triggering merged PR comments workflow
If we want to be able to have merged PR comments for SCMs other than GitHub, we'll need to generalize some of the flows. In this PR I generalize the flow to trigger the merged PR comments workflow.
- Check if the repo for the suspect commit has a provider that supports merged PR comments
- Move the custom logic needed to fetch the merge commit sha from the commit sha into the GitHub client, this can be repeated for other SCMs. We use this to find the PR associated with the merge commit sha in our db.
In a follow up PR, I will generalize the workflow itself.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.16%. Comparing base (
028e402) to head (43f79bd). Report is 148 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #71039 +/- ##
==========================================
+ Coverage 78.13% 78.16% +0.03%
==========================================
Files 6670 6672 +2
Lines 298465 298750 +285
Branches 51354 51427 +73
==========================================
+ Hits 233212 233530 +318
+ Misses 58993 58955 -38
- Partials 6260 6265 +5
| Files | Coverage Δ | |
|---|---|---|
| src/sentry/integrations/github/client.py | 83.42% <100.00%> (+0.43%) |
:arrow_up: |
| src/sentry/tasks/commit_context.py | 98.38% <100.00%> (+2.32%) |
:arrow_up: |
This pull request has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
This pull request has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀