Classroom Feedback PR when main branch is not master

In github classroom, feedback pull-request doesn’t seem to work properly when the default branch is not master.

I even have the review button, but it goes to an issue that doesn’t exist

It looks like the procedure is to create a branch called feedback, and then open a PR from master against that feedback branch, but if master doesn’t exist, it just doesn’t happen.

Hi @kescobo!

At the moment I’m afraid Classroom only supports a flow where the default branch is called master, but GitHub as a whole is moving away from this pattern, and aiming to let people have whatever default branch name they like for all features and workflows.

We should be making some announcements about this, along with tooling and documentation to make these changes, in the next month or so.

You might want to keep an eye on the Education Community for updates on this particular feature!

1 Like

OK, thanks for that info!

For reference, I sorted out how to do this manually, so in case it’s helpful for others stumbling on this:

  1. Checkout a new branch git checkout -b feedback
  2. Reset to the first commit git reset --hard $(git rev-list --max-parents=0 HEAD)
  3. Push to the student repo git push -u origin feedback
  4. Open a pull request from the default branch to feedback

2 Likes

Thanks for sharing your workaround!

1 Like