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

Honor repo flag on sync #8

Merged
merged 3 commits into from
Sep 21, 2020
Merged

Honor repo flag on sync #8

merged 3 commits into from
Sep 21, 2020

Conversation

hashtagchris
Copy link
Contributor

@hashtagchris hashtagchris commented Sep 18, 2020

  • 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

nwo, err = validateNwo("bogus/bogus/bogus")
require.Error(t, err)

// A separate destination is only permitted for "repo names", not NWOs.
Copy link
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.

Copy link
Contributor

@anthonysterling anthonysterling left a comment

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. 🙇‍♂️

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