pxt-microbit icon indicating copy to clipboard operation
pxt-microbit copied to clipboard

Unable to integrate with GitHub

Open basil-dsouza opened this issue 3 years ago • 10 comments

Unable to integrate from makecode.microbit.org to GitHub

To Reproduce Steps to reproduce the behavior:

  1. Go to a browser that has never visited makecode.microbit.org (or click on "reset" in the settings, either will work)
  2. Click on Import
  3. Click on "Import Url"
  4. Add in the path to a repo (in my case i pointed to an empty repo)
  5. It tells you : "Initialize GitHub repository for MakeCode?"
  6. Click on "OK" to proceed
  7. Sign in using a developer token (that has access to only public_repo)
  8. You get an orange background error saying "Network request failed"

Expected behavior Would've expected

Screenshots image

The rest of the steps arent relevant cause at this point nothing is configured at all, but still adding in some details that I have micro:bit version (please complete the following information): Doesnt need microbit to simulate, works with just the browser

You can find this information in the lower right hand corner of the back of micro:bit (the side that says BBC micro:bit).

  • Which version of the micro:bit is this relevant to [ EG V1.3, V1.5, V2.0, or specify it's not hardware related ]

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome (94.0.4606.81 (Official Build) (64-bit)) / Edge (94.0.992.50 (Official build) (64-bit))

basil-dsouza avatar Oct 18 '21 18:10 basil-dsouza

We don't support importing any repo. This needs to be a makecode repo. It needs to have pxt.json.

abchatra avatar Oct 19 '21 16:10 abchatra

You can create a new repo from makecode project by clicking on github icon image

abchatra avatar Oct 19 '21 16:10 abchatra

Creating a repo also fails. Or rather, it succeeds, but only creates a completely empty repo with no contents (other than a gitignore file)

Also, the import definitely is an option in the menu so am surprised you say it isn't supported.

basil-dsouza avatar Oct 19 '21 21:10 basil-dsouza

Creating a repro should succeed. Otherwise it is a bug.

We support importing only makecode repos and not any repo.

abchatra avatar Oct 19 '21 22:10 abchatra

@basil-dsouza can you share the repo which you created using the "create repo" button?

abchatra avatar Oct 19 '21 22:10 abchatra

https://github.com/basil-dsouza/microbit-simple-music-button

So what happens is that:

  1. I click on the button to save project to repo
  2. It asks me to log in to GitHub (I chose via developer token - with public_repo)
  3. It then asks me for repo name and description.
  4. I then click ok and it creates this empty repo (that I linked at the start of this comment)
  5. But the button doesn't change and any further changes aren't saved either.

basil-dsouza avatar Oct 19 '21 22:10 basil-dsouza

I tried this one more time to also capture the console logs. Steps performed:

  1. Created a new project: test
  2. Clicked on the create repo icon
  3. Logged in using developer token with "remember me" turned on
  4. Chose default settings for name, etc
  5. Got no error on screen but in console there was an error when creating tree (See screenshot lower down) 6.Only an empty Repo got created: https://github.com/basil-dsouza/test

image

And if it helps, i tried this same process with arcade.makecode.com and resulted in a similar error, where i got an empty repo (didnt get to see the console there)

basil-dsouza avatar Oct 20 '21 20:10 basil-dsouza

Has anyone had a chance to look into this? Can anyone at least confirm if they can reproduce this problem, or is it only happening on my machine?

Seems like a very basic feature to not be working and for no one to notice it.

basil-dsouza avatar Feb 07 '22 18:02 basil-dsouza

@basil-dsouza It works for me when I log in with my email address and password. but using a developer token with only public_repo ticked, an empty repo is created, the MakeCode github button doesn't get an arrow, and then the project cannot be loaded from home.

martinwork avatar Feb 08 '22 10:02 martinwork

@martinwork Thanks for confirming that! I've gone back to directly logging in rather than using developer tokens and that has solved my problem.

I think this issue should remain open though cause it is still a valid open issue. I'll leave it's prioritization to whoever maintains this repo.

basil-dsouza avatar Feb 13 '22 12:02 basil-dsouza