(Chore): Store additional CircleCI env vars#1071
Merged
trunk-io[bot] merged 2 commits intomainfrom Apr 17, 2026
Merged
Conversation
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1071 +/- ##
==========================================
+ Coverage 81.70% 81.99% +0.29%
==========================================
Files 69 69
Lines 14879 14905 +26
==========================================
+ Hits 12157 12222 +65
+ Misses 2722 2683 -39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TylerJang27
commented
Apr 17, 2026
| "CIRCLE_NODE_INDEX", | ||
| "CIRCLE_NODE_TOTAL", | ||
| "CIRCLE_PIPELINE_ID", | ||
| "CIRCLE_PIPELINE_NUMBER", // not a built-in but is common practice |
Collaborator
Author
There was a problem hiding this comment.
See description, I want to start tracking how common setting this value is, as a more valid fallback
max-trunk
approved these changes
Apr 17, 2026
| /// `https://circleci.com/gh/{org}/{repo}/{build_num}`. | ||
| /// Reference: https://discuss.circleci.com/t/circle-build-url-environment-variable-changing-for-projects-that-use-github-app-gitlab/49980/7 | ||
| fn circleci_gh_org_repo_from_build_url(url: &str) -> Option<(&str, &str)> { | ||
| const PREFIX: &str = "https://circleci.com/gh/"; |
Contributor
There was a problem hiding this comment.
Can extract & reuse const in
if url.starts_with("https://circleci.com/gh/")
condition above ^ ?
dfrankland
approved these changes
Apr 17, 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.
Include additional CircleCI env vars to form full job URLs.
We'll need a repo version bump for ingestion to pick up the URL changes.
Most of this is informed by:
For reference, a quick example is:
${CIRCLE_BUILD_URL}will be something likehttps://circleci.com/gh/healthie/web/${CIRCLE_BUILD_NUM}https://app.circleci.com/pipelines/github/healthie/web/${pipeline-number}/workflows/${CIRCLE_WORKFLOW_ID}/jobs/${CIRCLE_BUILD_NUM}, which can be extended with/parallel-runs/${CIRCLE_NODE_INDEX}pipeline-number(number, usually set via config like below) is also substitutable with${CIRCLE_PIPELINE_ID}(uuid)