-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: track GitHub PRs in CLI events #177
feat: track GitHub PRs in CLI events #177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably just needs a go mod tidy
530d7d2
to
351e81a
Compare
… GH_PULL_REQUEST when present
351e81a
to
a081a0d
Compare
@@ -124,6 +124,13 @@ func Track(ctx context.Context, exec shared.InteractionType, fn func(ctx context | |||
// Execute the provided function, capturing any error | |||
err = fn(ctx, runEvent) | |||
|
|||
// Populate event with pull request env var (available only after run) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super excited about having to move this outside EnrichEventWithEnvironmentVariables
which otherwise was the perfect place to do this, but short of a more involved refactor this should do the trick.
ac8a40f
to
6db8428
Compare
Collects the GitHub PR URL (when applicable) and adds it to the event telemetry (again when applicable).