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(server): auto cancel previous builds triggered by PR events #1552

Merged
merged 2 commits into from Jan 10, 2021

Conversation

knight42
Copy link
Collaborator

@knight42 knight42 commented Jan 7, 2021

What type of PR is this?

/area cicd
/kind feature

What this PR does / why we need it:

  • Get the update timestamp from webhook payload
  • Add annotation workflowrun.cyclone.dev/scm-pr-updated-at and label workflowrun.cyclone.dev/scm-pr-ref to wfr triggered by PR events
  • When handling webhook, process all events sequentially and ignore the event that is triggered earlier, and update PR status in the background.

Complement #1541

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Fixes #

Reference to #

Special notes for your reviewer:

/cc @zhujian7

Does this PR introduce a user-facing change?:

NONE

@caicloud-bot caicloud-bot added release-note-none Denotes a PR that doesn't merit a release note. area/cicd Pipeline related functions. kind/feature Categorizes issue or PR as related to a new feature. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 7, 2021
@knight42 knight42 changed the title Feat/auto cancel feat(server): auto cancel previous builds triggered by PR events Jan 7, 2021
@knight42 knight42 force-pushed the feat/auto-cancel branch 2 times, most recently from d5d70ea to cd5eadb Compare January 7, 2021 12:03
@zhujian7
Copy link
Collaborator

/lgtm

@caicloud-bot caicloud-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 10, 2021
@caicloud-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zhujian7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caicloud-bot caicloud-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2021
@caicloud-bot caicloud-bot merged commit 48089c6 into caicloud:master Jan 10, 2021
@knight42 knight42 deleted the feat/auto-cancel branch January 11, 2021 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cicd Pipeline related functions. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants