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

Use GH actions concurrency to cancel runs #921

Merged
merged 4 commits into from
Nov 2, 2021
Merged

Use GH actions concurrency to cancel runs #921

merged 4 commits into from
Nov 2, 2021

Conversation

lars-reimann
Copy link
Contributor

@lars-reimann lars-reimann commented Nov 2, 2021

Fixes #920

Proposed Changes

  1. Use workflow concurrency instead of skip-duplicate-actions
  2. Update mega-linter-runner template
  3. Add a regex replacement to the updater (job removal + comment removal)

Capabilities of the regex:

  • Works with varying whitespace (including indentation)
  • Keeps any jobs that come before or after the cancel_duplicates job.

Downsides of the regex:

  • It will not work if the user has renamed the cancel_duplicates job. I don't see a way to reliably fix this, however.
  • It removes comments between the end of the cancel_duplicates job and the start of the next. This can be fixed by matching the end of the cancel_duplicates job more exactly, but that again makes it more likely that the automatic update fails if the user has changed the workflow.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

@lars-reimann lars-reimann marked this pull request as ready for review November 2, 2021 21:06
@lars-reimann lars-reimann marked this pull request as draft November 2, 2021 21:10
@codecov-commenter
Copy link

Codecov Report

Merging #921 (e00bdac) into main (f0d359c) will increase coverage by 0.03%.
The diff coverage is n/a.

❗ Current head e00bdac differs from pull request most recent head 83a9e58. Consider uploading reports for the commit 83a9e58 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #921      +/-   ##
==========================================
+ Coverage   87.46%   87.50%   +0.03%     
==========================================
  Files         136      136              
  Lines        3272     3272              
==========================================
+ Hits         2862     2863       +1     
+ Misses        410      409       -1     
Impacted Files Coverage Δ
megalinter/reporters/UpdatedSourcesReporter.py 89.18% <0.00%> (+2.70%) ⬆️

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 698e42e...83a9e58. Read the comment docs.

@lars-reimann lars-reimann marked this pull request as ready for review November 2, 2021 21:37
Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

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

Amazing regex !
And you even corrected some bug I let while migrating to V5, thanks a lot !
Please can you also add a line in CHANGELOG.md ?

@nvuillam nvuillam merged commit d37dbe3 into oxsecurity:main Nov 2, 2021
@lars-reimann
Copy link
Contributor Author

@nvuillam I guess an additional changelog entry is not needed anymore, right?

@nvuillam
Copy link
Member

nvuillam commented Nov 3, 2021

@lars-reimann you did such a fine job that i thought I owed you that ;)

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.

Use concurrency option of GH actions to cancel previous workflow runs
3 participants