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(directives): allow ignore rules for copy #2649

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Oct 4, 2024

This adds the option to configure ignore rules for the copy directive, i.e.:

steps:
- uses: copy
  config:
    inPath: ./src
    outPath: ./dst
    ignore: |
      # Ignore all *.log files
      *.log
      # Except for the ones in ./src/foo
      !foo/*.log

By default, the .git/ directory is ignored. However, this can be overwritten using:

steps:
- uses: copy
  config:
    ignore: |
      # Overwrite default exclude with explicit include
      !.git/

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 4819415
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66fff56aa7c9730008841fa4
😎 Deploy Preview https://deploy-preview-2649.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 4819415
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/66fff56a1881ed0008076cd4
😎 Deploy Preview https://deploy-preview-2649--docs-kargo-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.09%. Comparing base (cdec347) to head (1ca52f6).

Files with missing lines Patch % Lines
internal/directives/file_copier.go 88.88% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2649      +/-   ##
==========================================
+ Coverage   51.04%   51.09%   +0.04%     
==========================================
  Files         282      282              
  Lines       21092    21119      +27     
==========================================
+ Hits        10766    10790      +24     
- Misses       9644     9646       +2     
- Partials      682      683       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krancour
Copy link
Member

krancour commented Oct 4, 2024

By default, the .git/ directory is ignored.

.git is a directory, of course, for a typical clone, but for a working tree of a bare repo, .git is a file.

By my reading of the code, the pattern you are using is .git (and not .git/), so I think our bases are covered, but I just wanted to double-check with you.

@krancour
Copy link
Member

krancour commented Oct 4, 2024

I see you amended the tests to assert that .git dir and .git file are both covered by default.

@hiddeco hiddeco enabled auto-merge October 4, 2024 14:05
@hiddeco hiddeco added this pull request to the merge queue Oct 4, 2024
Merged via the queue into akuity:main with commit 694504d Oct 4, 2024
19 checks passed
@hiddeco hiddeco deleted the copy-ignore branch October 4, 2024 14:25
github-actions bot pushed a commit that referenced this pull request Oct 4, 2024
Signed-off-by: Hidde Beydals <[email protected]>
(cherry picked from commit 694504d)
@akuitybot
Copy link

Successfully created backport PR for release-0.9:

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

Successfully merging this pull request may close these issues.

3 participants