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

Fix breaking changes workflow #52

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

mackjmr
Copy link
Member

@mackjmr mackjmr commented Apr 12, 2023

What does this PR do?

Currently, the breaking changes workflow is failing for push events (example).

This is due to the fact that github.head_ref is only available when the event that triggers a workflow run is either pull_request or pull_request_target (see doc).

This PR modifies the breaking changes workflow to only run when the event_name is pull_request.

Motivation

Failing tests (example).

Currently, the breaking changes workflow is failing for push events ([example](https://github.com/DataDog/opentelemetry-mapping-go/actions/runs/4678758871)).

This is due to the fact that `github.head_ref` is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target` (see [doc](https://docs.github.com/en/actions/learn-github-actions/contexts#:~:text=GitHub%20GraphQL%20API.-,github.head_ref,-string)).

- link to [push events](https://github.com/DataDog/opentelemetry-mapping-go/actions?query=event%3Apush) ❌
- link to [pull_request events](https://github.com/DataDog/opentelemetry-mapping-go/actions?query=event%3Apull_request) ✅

This PR modifies the breaking changes workflow to only run when the event_name is `pull_request`.
@mackjmr mackjmr requested a review from mx-psi April 12, 2023 14:41
@mackjmr mackjmr requested a review from a team as a code owner April 12, 2023 14:41
Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@mackjmr mackjmr merged commit 412f048 into main Apr 12, 2023
@mackjmr mackjmr deleted the mackjmr/fix-breaking-changes-workflow branch April 12, 2023 14:54
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