Skip to content
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

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

RogWilco
Copy link
Contributor

@RogWilco RogWilco commented Oct 11, 2024

Collects the GitHub PR URL (when applicable) and adds it to the event telemetry (again when applicable).

@RogWilco RogWilco self-assigned this Oct 11, 2024
Copy link

linear bot commented Oct 11, 2024

Copy link
Contributor

@ryan-timothy-albert ryan-timothy-albert left a 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

@RogWilco RogWilco force-pushed the nick/spe-4224-track-generate-github-pr-in-cli-events branch from 530d7d2 to 351e81a Compare October 11, 2024 21:26
@RogWilco RogWilco marked this pull request as ready for review October 11, 2024 21:48
@RogWilco RogWilco requested a review from a team as a code owner October 11, 2024 21:48
@RogWilco RogWilco force-pushed the nick/spe-4224-track-generate-github-pr-in-cli-events branch from 351e81a to a081a0d Compare October 12, 2024 00:20
@@ -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)
Copy link
Contributor Author

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.

@RogWilco RogWilco force-pushed the nick/spe-4224-track-generate-github-pr-in-cli-events branch from ac8a40f to 6db8428 Compare October 16, 2024 20:45
@RogWilco RogWilco merged commit dee9c09 into main Oct 16, 2024
1 check passed
@RogWilco RogWilco deleted the nick/spe-4224-track-generate-github-pr-in-cli-events branch October 16, 2024 22:31
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.

2 participants