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

Change code coverage trigger #178

Merged
merged 4 commits into from
Sep 2, 2022
Merged

Change code coverage trigger #178

merged 4 commits into from
Sep 2, 2022

Conversation

fridgepoet
Copy link
Member

@fridgepoet fridgepoet commented Sep 1, 2022

Motivation: pull_request is actually describing the target branch. So the check for the name of the PR branch is handled in if: !startsWith(github.head_ref, 'dependabot')
See the doc page here:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows

To run a job based on the pull request's head branch name (as opposed to the pull request's base branch name), use the github.head_ref context in a conditional.

Description:This change makes it so that any PR branch which starts with dependabot skips the Code Coverage workflow.

Part of grafana/code-coverage#17

@fridgepoet fridgepoet requested a review from a team as a code owner September 1, 2022 13:17
@github-actions
Copy link

github-actions bot commented Sep 1, 2022

Backend code coverage report for PR #178
No changes

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

Frontend code coverage report for PR #178
No changes

Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for catching this!

Copy link
Member

@sarahzinger sarahzinger left a comment

Choose a reason for hiding this comment

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

🎉

.github/workflows/code-coverage.yml Show resolved Hide resolved
@fridgepoet
Copy link
Member Author

Going to go ahead and merge to see how it works out!

@fridgepoet fridgepoet merged commit 6c851de into main Sep 2, 2022
@fridgepoet fridgepoet deleted the workflow branch September 2, 2022 15:27
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.

None yet

3 participants