Skip to content

Skip preview links for non-main PRs#6161

Merged
mstange merged 1 commit into
firefox-devtools:mainfrom
skylarkning:skip-preview-links-non-main-prs
Jul 9, 2026
Merged

Skip preview links for non-main PRs#6161
mstange merged 1 commit into
firefox-devtools:mainfrom
skylarkning:skip-preview-links-non-main-prs

Conversation

@skylarkning

@skylarkning skylarkning commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Summary

  • Limit the preview-link workflow to pull requests that target the main branch.
  • Skip deployment PRs that target production by not running the workflow for them.

Example

For a deployment PR like #6156 that targets production, the add-preview-links workflow no longer runs, so it will not re-add preview links after they are removed.

Addresses #6157.

Testing

  • node --test .github/scripts/add-preview-links.test.mjs
  • node --check .github/scripts/add-preview-links.mjs
  • node --check .github/scripts/add-preview-links.test.mjs
  • git diff --check
  • oxfmt --check .github/scripts/add-preview-links.mjs .github/scripts/add-preview-links.test.mjs

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.50%. Comparing base (b2c0eba) to head (625c2f6).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6161   +/-   ##
=======================================
  Coverage   83.50%   83.50%           
=======================================
  Files         342      342           
  Lines       36522    36522           
  Branches    10224    10125   -99     
=======================================
  Hits        30497    30497           
  Misses       5597     5597           
  Partials      428      428           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mstange

mstange commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Isn't this something that can be done in the yaml file which says where we run this job? I'm not really sure though

@canova

canova commented Jul 9, 2026

Copy link
Copy Markdown
Member

Isn't this something that can be done in the yaml file which says where we run this job? I'm not really sure though

I was just writing a similar comment, it should be possible to do it like this: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#using-filters

@skylarkning

Copy link
Copy Markdown
Contributor Author

True! I over-complicated it. Let me change it in the yaml instead. Thanks

@skylarkning skylarkning force-pushed the skip-preview-links-non-main-prs branch from 3a538cf to 625c2f6 Compare July 9, 2026 16:58
@mstange mstange merged commit ba6a829 into firefox-devtools:main Jul 9, 2026
24 checks passed
@mstange

mstange commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@canova

canova commented Jul 10, 2026

Copy link
Copy Markdown
Member

Thanks for addressing it so quickly!

@skylarkning

Copy link
Copy Markdown
Contributor Author

Thanks for addressing it so quickly!

No problem! Thanks Nazim!

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.

3 participants