Skip to content

Honor repo flag on sync#8

Merged
hashtagchris merged 3 commits into
actions:mainfrom
hashtagchris:issue2
Sep 21, 2020
Merged

Honor repo flag on sync#8
hashtagchris merged 3 commits into
actions:mainfrom
hashtagchris:issue2

Conversation

@hashtagchris

@hashtagchris hashtagchris commented Sep 18, 2020

Copy link
Copy Markdown
Contributor
  • Honor the repo flag on sync. Ignore other actions in the cache directory.
  • Fix actions-sync version so it doesn't require a cache-dir flag.
  • Bump the version number. 😄

As part of these changes you can now optionally supply a repo flag to push as well, in case you don't want to push the whole cache. sync and push use the directories under the cache dir as a repo list if a repo flag wasn't supplied. There are a lot of code changes as a consequence of removing cache-dir as a global flag, and utility functions being moved to reponames.go.

Closes #2

Comment thread src/reponames_test.go
nwo, err = validateNwo("bogus/bogus/bogus")
require.Error(t, err)

// A separate destination is only permitted for "repo names", not NWOs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

// A separate destination is only permitted for "repo names", not NWOs.

I almost added types for repoName and nwo to make the distinction clearer, but it looked like too much of a pain to convert string slices to another type.

@anthonysterling anthonysterling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this Chris, features++ and 🧹++ too. 🙇‍♂️

@hashtagchris hashtagchris merged commit 9c28fe3 into actions:main Sep 21, 2020
@hashtagchris hashtagchris deleted the issue2 branch September 21, 2020 20:52
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.

Do not sync every directory if a user provides a repo-* flag

2 participants