Feature request: When opening assignment list in a browser, URL should also be outputted, similar to gh auth login, in case terminal is headless

Open Beginner friendly
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start at the implementation of gh classroom assignments --web and compare its browser-opening behavior with the gh auth login example. Make the assignment-list flow provide the browser URL when opening is unavailable or the terminal is headless, then verify that the URL is still shown alongside the existing assignment output.

Written by the indexing model from the issue text.

Description

E.g.:

$ gh classroom assignments --web
? Select a classroom: Introduction to Game Development
22 Assignments for Introduction to Game Development

Opening in your browser.

Versus:

$ gh auth login
? You're already logged into github.com. Do you want to re-authenticate? Yes
? What is your preferred protocol for Git operations? HTTPS
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: 306B-9B4C
Press Enter to open github.com in your browser... 
! Failed opening a web browser at https://github.com/login/device
  exec: "xdg-open,x-www-browser,www-browser,wslview": executable file not found in $PATH
  Please try entering the URL in your browser manually
Dominant language
Go
Stars
126
Forks
21
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-classroom

All issues in github/gh-classroom

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.