Skip to content

Avoid running the workflow twice on PR pushes#700

Merged
mjpieters merged 1 commit intomasterfrom
avoid-double-runs
Mar 28, 2022
Merged

Avoid running the workflow twice on PR pushes#700
mjpieters merged 1 commit intomasterfrom
avoid-double-runs

Conversation

@mjpieters
Copy link
Copy Markdown
Contributor

When someone force-pushes to a PR or adds a new commit, the workflow would run
twice, as both push and pull_request events would trigger.

The default for types is [opened, reopened, synchronize]; the latter is the
type that overlaps with push.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Mar 28, 2022
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2022

Codecov Report

Merging #700 (58bc59b) into master (401ffb1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #700   +/-   ##
=======================================
  Coverage   99.73%   99.73%           
=======================================
  Files           4        4           
  Lines         750      750           
  Branches      170      170           
=======================================
  Hits          748      748           
  Misses          2        2           
Flag Coverage Δ
unit 99.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 401ffb1...58bc59b. Read the comment docs.

@mjpieters mjpieters enabled auto-merge (squash) March 28, 2022 17:39
When someone force-pushes to a PR or adds a new commit, the workflow would run
_twice_, as both `push` and `pull_request` events would trigger.

The default for `types` is `[opened, reopened, synchronize]`; the latter is the
type that overlaps with `push`.

In addition, existing runs for the same PR are cancelled whenever a push is made.
@mjpieters mjpieters merged commit 4b69b43 into master Mar 28, 2022
@mjpieters mjpieters deleted the avoid-double-runs branch March 28, 2022 18:59
93578237 pushed a commit to 93578237/yarl that referenced this pull request Mar 29, 2022
When someone force-pushes to a PR or adds a new commit, the workflow would run
_twice_, as both `push` and `pull_request` events would trigger.

The default for `types` is `[opened, reopened, synchronize]`; the latter is the
type that overlaps with `push`.

In addition, existing runs for the same PR are cancelled whenever a push is made.
@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented Dec 4, 2023

When someone force-pushes to a PR or adds a new commit, the workflow would run
twice, as both push and pull_request events would trigger.

Important clarification: this only applies to PRs from within the upstream repo, which is why adopted a practice of making forks even where I have a commit bit. This is what we also enforce at Ansible…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants