Allow for tests to run for dependabot without need for label#3524
Allow for tests to run for dependabot without need for label#3524
Conversation
SummaryThis PR fixes dependabot auto-merge by allowing BrowserStack tests to run automatically for Changes (
|
| Scenario | label.name == 'safe_to_test' |
user.login == 'dependabot[bot]' |
Job runs? |
|---|---|---|---|
| Fork PR opened / pushed | false (no label event) |
false |
No |
Fork PR labeled safe_to_test |
true |
false |
Yes |
| Dependabot PR opened / pushed | false |
true |
Yes |
Dependabot PR labeled safe_to_test |
true |
true |
Yes |
| Any PR, non-safe label applied | false |
depends | Only if dependabot |
The [bot] suffix is GitHub-reserved for GitHub App accounts. Regular users cannot impersonate dependabot[bot], so the check is safe. Fork PRs from untrusted contributors still require a maintainer to apply the safe_to_test label before secrets are exposed.
Potential Issues
1. Increased workflow trigger volume (Low impact)
Every opened/synchronize event on any PR now triggers the workflow, even though the if condition skips it for non-matching PRs. This consumes a small amount of Actions quota for the "check if condition" evaluation but is negligible in practice.
2. Double runs on dependabot PRs (Negligible)
If someone manually labels a dependabot PR with safe_to_test, the workflow runs from the labeled event while it may already be running from the opened/synchronize event. This is unlikely in practice since the whole point is to avoid labeling dependabot PRs.
3. Post-merge manual step required (Important)
The PR description notes that the Integrate Pull Request environment must be removed from Settings -> Branches -> Branch protection rules -> master -> "Require deployments to succeed". This orphaned gate from PR #3521 is what currently blocks all dependabot merges. This manual step is essential for the fix to take effect.
…k test runs per PR at a time, eliminating the double-run scenario
|
Workflow fix ( |
Category
Core Functionality
Feature/Issue Description
Q: Please give a brief summary of your feature/fix
A: Fixes dependabot auto-merge by allowing BrowserStack tests to run automatically for
dependabot[bot]PRs without requiring thesafe_to_testlabel. Fork PRs still require the label.Important
After merging, the
Integrate Pull Requestenvironment must be removed from Settings → Branches → Branch protection rules → master → "Require deployments to succeed". This orphaned gate from PR #3521 is what's currently blocking all dependabot merges. Once removed, tests will run and auto-merge will resume immediately.Q: Give a technical rundown of what you have changed (if applicable)
A:
openedandsynchronizetopull_request_targettrigger typesifto also allowdependabot[bot]PRssafe_to_testlabel removal step conditionalTest Cases
Q: Describe your test cases, what you have covered and if there are any use cases that still need addressing.
A:
safe_to_testlabelWiki Page
N/A