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

Get organized: owner/repo = repo_spec #376

Merged
merged 2 commits into from May 31, 2018

Conversation

Projects
None yet
2 participants
@jennybc
Member

jennybc commented May 31, 2018

Main points:

  • Continue to standardize user-facing args and internal vocabulary around GitHub:
    • r-lib/usethis: owner = r-lib, repo = usethis, repo_spec = r-lib/usethis
  • Add more helpers around GitHub owner, repo, repo_spec

Questions:

  • Is it bad to use non-exported functions in default arg values? General question.
  • Should the browse_*() family switch over to repo_spec from package? Right now, target repo is driven by GitHub info found in URL field of DESCRIPTION. But maybe it should be driven by the local remote associated with GitHub? Or try one then the other?
    • Pro: everything would work for non-package projects
    • Con: less favourable if you're working with someone else's package. But how relevant is that?

Happy to discuss/review during 1-on-1.

@jennybc jennybc requested a review from hadley May 31, 2018

Show outdated Hide outdated R/create.R
repo = NULL,
from = releases(owner = owner, repo = repo)[[1]],
use_tidy_thanks <- function(repo_spec = github_repo_spec(),
from = releases(repo_spec)[[1]],

This comment has been minimized.

@jennybc

jennybc May 31, 2018

Member

I dislike using unexported functions for the defaults. But also like having a sensible default and revealing it.

@jennybc

jennybc May 31, 2018

Member

I dislike using unexported functions for the defaults. But also like having a sensible default and revealing it.

This comment has been minimized.

@hadley

hadley May 31, 2018

Member

Should we add this as an argument to use_github_labels() too?

@hadley

hadley May 31, 2018

Member

Should we add this as an argument to use_github_labels() too?

This comment has been minimized.

@jennybc

jennybc May 31, 2018

Member

I don't think we need to add repo_spec to use_github_labels(). I makes sense to me that it works on the active project.

I think use_tidy_thanks() is different and pretty unique because you are likely to use it while in another project, e.g. composing a post in the tidyverse.org project.

@jennybc

jennybc May 31, 2018

Member

I don't think we need to add repo_spec to use_github_labels(). I makes sense to me that it works on the active project.

I think use_tidy_thanks() is different and pretty unique because you are likely to use it while in another project, e.g. composing a post in the tidyverse.org project.

@hadley

hadley approved these changes May 31, 2018

Show outdated Hide outdated R/create.R
repo = NULL,
from = releases(owner = owner, repo = repo)[[1]],
use_tidy_thanks <- function(repo_spec = github_repo_spec(),
from = releases(repo_spec)[[1]],

This comment has been minimized.

@hadley

hadley May 31, 2018

Member

Should we add this as an argument to use_github_labels() too?

@hadley

hadley May 31, 2018

Member

Should we add this as an argument to use_github_labels() too?

@jennybc

This comment has been minimized.

Show comment
Hide comment
@jennybc

jennybc May 31, 2018

Member

We've decided to leave the browse_*() family alone for now, but it remains on the radar for future change.

Member

jennybc commented May 31, 2018

We've decided to leave the browse_*() family alone for now, but it remains on the radar for future change.

@jennybc jennybc merged commit c21b284 into master May 31, 2018

5 of 6 checks passed

codecov/patch 8.33% of diff hit (target 60.99%)
Details
codecov/project 60.93% (-0.07%) compared to 105f394
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jennybc jennybc deleted the owner-repo-repospec branch May 31, 2018

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