rundel / ghclass

Tools for managing classroom organizations
https://rundel.github.io/ghclass/
GNU General Public License v3.0
142 stars 22 forks source link

org_create_assignment errors on trying to mirror repo #82

Open merliseclyde opened 5 years ago

merliseclyde commented 5 years ago

Using a repo that is either a template or not, I am getting errors when trying to create an assignment.

For the case that it is not a repo, it fails on trying to clone (repo_mirror) the repo with an error

  unused argument (mirror = mirror)
Error: Unable to locate the repo(s): '/private/var/folders/n4/nj1122xj6bn5_xgbptv7bml40000gp/T/RtmpYRsjni/HW5'.

For a template repo it gives the error

✖ Failed to mirror 'STA521-F19/HW5' to 'STA521-F19/HW5-Team5-01'.
  GitHub API error (422): 422 Unprocessable Entity
  └─ Unprocessable Entity (See
     https://developer.github.com/v3/repos/#create-repository-using-a-repository-template)
mine-cetinkaya-rundel commented 5 years ago

I was having a similar issue, I think it has to do with the gert branch being merged. I got this error when running org_create_assignment()but I was able to get to the same result with doing the three steps individually: repo_create(), repo_add_team(), repo_mirror().

repo_mirror_template() also failed for me.

rundel commented 5 years ago

I think this is because the current version depends on a updated version of gert that is still sitting in a pull request. If you install gert from my branch:

remotes::install_github("rundel/gert@mirror")

does that fix things?

merliseclyde commented 5 years ago

Yes - I had installed rundel@master, but with mirror it is working.

The repo_mirror step now asks for confirmation for every repo (or more); the repo was created prior, but failed to clone. Can there be an overwrite=TRUE option ?

merliseclyde commented 5 years ago

Using a template repo still fails for me...

rundel commented 5 years ago

I'd think both of these issues should be fixed now.

The prompting was me just not handling the possibility of writing things gracefully - repo_mirror now checks the targets to see if they have any commits - if there are more than one then it will prompt you to rerun with overwrite=TRUE.

The template repo issue I believe was likely due to GitHub's template mirroring requiring that the target repo does not exist. Their process creates the repo and then populates it - the error messaging and checks wrt were terrible so I've made some changes to improve that.

Let me know if this solves things or if there are lingering issues.

merliseclyde commented 5 years ago

Thanks!!! Will check it out with next assignment :-) cheers, m

Merlise A Clyde Professor Department of Statistical Science Duke University

clyde@duke.edumailto:clyde@duke.edu 919 681 8440

On Oct 18, 2019, at 7:14 AM, Colin Rundel notifications@github.com<mailto:notifications@github.com> wrote:

I'd think both of these issues should be fixed now.

The prompting was me just not handling the possibility of writing things gracefully - repo_mirror now checks the targets to see if they have any commits - if there are more than one then it will prompt you to rerun with overwrite=TRUE.

The template repo issue I believe was likely due to GitHub's template mirroring requiring that the target repo does not exist. Their process creates the repo and then populates it - the error messaging and checks wrt were terrible so I've made some changes to improve that.

Let me know if this solves things or if there are lingering issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rundel_ghclass_issues_82-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAC54FHKLYIRBMQMONHQDFDQPGLCPA5CNFSM4JBTLP22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBT6SMQ-23issuecomment-2D543680818&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=x3pHRqWA0t5CXMKfReZn7ZqLj13kFVUgFfTldRCztdQ&m=uV5qkF_u5YTsTZ2xFUKPeSAgEK5woFTtUMtI2RhRzdY&s=o1ISFe7a3qvVuyrnVHxRD-j98F2B9lxjdj9zl2nQp5Q&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAC54FCCZVTR3MRA2BTBL2LQPGLCPANCNFSM4JBTLP2Q&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=x3pHRqWA0t5CXMKfReZn7ZqLj13kFVUgFfTldRCztdQ&m=uV5qkF_u5YTsTZ2xFUKPeSAgEK5woFTtUMtI2RhRzdY&s=kqLFKlz8IXVgMpahDuY2xPuGu6D9StOCW4IpivoUg3I&e=.

Merlise A Clyde Professor Department of Statistical Science Duke University http://stat.duke.edu/~clyde

clyde@duke.edumailto:clyde@duke.edu 919 681 8440