Commit graph

1764 commits

Author SHA1 Message Date
Nate Smith
59082a1fde
Merge pull request #4802 from cli/mislav/bin-ext-create
Extensions create 💅
2021-11-30 16:36:24 -06:00
Nate Smith
56faf17b06
Merge pull request #4718 from cli/bin-ext-create
make extension create binary aware
2021-11-30 16:36:00 -06:00
Mislav Marohnić
acc1759434 Allow downloading the archive of the latest release 2021-11-30 15:52:51 +01:00
Mislav Marohnić
8e311847db Ensure that we never download "legacy" archive formats
The `zipball_url` and `tarball_url` fields on the Release API payload
always link to "legacy" archives that are of a different format than
those one would get if they downloaded an archive from a Release using
the web interface. The GitHub API does not seem to publish links to
non-legacy archives.

This adds a redirect hack to turn "legacy" Codeload URLs into non-legacy
ones with the goal of ensuring the consistency of user experience when
downloading archives.
2021-11-30 15:52:51 +01:00
lpessoa
8058c4ea34 Adding gh release download for .zip and .tar.gz
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-30 15:52:51 +01:00
Parth
c987c5711d
pr merge: pull after switching branches (#4748) 2021-11-29 18:26:35 +01:00
Mislav Marohnić
323e53ebe3
Merge pull request #4803 from cli/issue-view-resilient
Improve `issue view` re: overfetching, PR support
2021-11-29 17:08:22 +01:00
Des Preston
bdd95e11ab
Don't swallow duplicate key error (#4807) 2021-11-25 13:22:42 +01:00
Mislav Marohnić
34fc5fb75c Improve issue view re: overfetching, PR support
- Supports passing a PR as argument, not just issues
- Makes it non-fatal when project cards were not able to load
- Cleans up legacy method for fetching issues
2021-11-24 18:49:36 +01:00
Mislav Marohnić
a573eb5d80
Fix codespace code command under WSL (#4747)
The `codespace code` command used the `skratchdot/open-golang` library
to open `vscode://` URLs, which uses `xdg-open` for Linux under the
hood, which isn't available under WSL.

This switches over to using the `cli/browser` package which has explicit
support for WSL by invoking `wslview` when found.
2021-11-24 16:18:24 +00:00
Parth
39bd9aafdc
pr merge: allow deleting remote branch if local branch does not exist (#4769) 2021-11-24 16:50:25 +01:00
Mislav Marohnić
a65b9a3831 💅 simplify filesystem operations while creating extensions
- doing mkdir before `git init <dir>` is not necessary; git will
  create the directory if it doesn't exist
- passing both `-C` and `--git-dir` is not needed for git invocations
- reading the current working directory isn't necessary for specifying
  nested paths to operate in
- use `git add .` instead of explicitly naming all paths; we generate a
  gitignore for binaries that we want to avoid adding
- generate cross-platform gitignore for Go binary extensions
- add helpers to simplify writing files, tests
2021-11-24 13:46:36 +01:00
Mislav Marohnić
e506910a08 Add newlines to generated files 2021-11-24 11:59:00 +01:00
vilmibm
6950c6ee32 binary extension create
- add a wizard to gh extension create
- add --precompiled-go
- add --precompiled-other
- build out scaffolding for both types of binary extensions
2021-11-23 16:53:45 -06:00
Mislav Marohnić
3cf3d6d2d4 Avoid overfetching in non-interactive issue edit 2021-11-23 21:10:37 +01:00
Mislav Marohnić
c8d5a6be02 Accept pull requests in issue edit argument 2021-11-23 20:39:19 +01:00
Mislav Marohnić
b75e705840 Remove overfetching from issue transfer 2021-11-23 19:39:40 +01:00
Mislav Marohnić
5be6b67ce7 Remove overfetching from issue delete 2021-11-23 19:39:40 +01:00
Mislav Marohnić
f99a149eb2 Improve issue reopen re: overfetching, handling PRs
- `issue reopen` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue reopen` now accepts either issue or pull number as argument.
2021-11-23 19:39:40 +01:00
Mislav Marohnić
07cad386a5 Improve issue close re: overfetching, handling PRs
- `issue close` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue close` now accepts either issue or pull number as argument.
2021-11-23 19:38:55 +01:00
Mislav Marohnić
1eb790cacd Improve issue comment re: overfetching, handling PRs
- `issue comment` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue comment` now accepts either issue or pull number as argument.
2021-11-23 16:40:14 +01:00
Marwan Sulaiman
a3940020f9
Inherit API endpoint configuration from the Codespaces environment (#4723)
gh codespace commands now respect the following environment variables:

- GITHUB_SERVER_URL: typically "https://github.com"
- GITHUB_API_URL: typically "https://api.github.com"
- INTERNAL_VSCS_TARGET_URL: typically "https://online.visualstudio.com"
- GITHUB_TOKEN when CODESPACES is set, even if the host connecting to isn't "github.com".

This set of changes ensures that `gh codespace` commands automatically connect to the right API endpoints when gh is used within a codespace.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-22 12:40:01 +01:00
Jeff Hubbard
3aef78fb71
Merge pull request #4756 from cli/no-idle-default
Remove the default value from idle-timeout
2021-11-19 15:01:23 -08:00
Sam Coe
03278453db
Escape workflow information when generating URLs 2021-11-18 12:17:59 -08:00
Jeff Hubbard
91dc722170 Remove the default value from idle-timeout as the API takes care of it and this can override user settings 2021-11-18 11:38:26 -08:00
Sam
2580a63a44
Merge pull request #4750 from cli/replace-shurcool
Replace shurcool/graphql with cli/shurcool-graphql
2021-11-18 09:10:06 -08:00
Stefan Huber
a1daf96314
Clarify magic type conversion of api params (#4434)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 14:14:50 +00:00
Benjamin Chadwick
6cc7712583
Confirm name change before creating a repo with special characters (#4562)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 13:24:48 +00:00
Benjamin Chadwick
c581a093ed
Encode segments of gh browse resulting URL (#4663)
- URLs are now always generated without a trailing slash
- Windows-style paths are normalized before processing
- Special characters in branch names are escaped

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 13:10:55 +00:00
Josh Gross
e82958b4e0
Support setting user Codespaces secrets (#4699)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 12:55:24 +01:00
Josh Gross
577f29ae0d
Support listing and removing user Codespaces secrets (#4714) 2021-11-18 12:53:35 +01:00
Jeff Hubbard
90313fbf96
Add idle timeout to cs create parameters (#4741)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 11:47:48 +00:00
Nate Smith
762d956c6f
Merge pull request #4655 from cli/issue-4589
add base repo resolution to `gh repo delete`
2021-11-17 15:25:04 -06:00
Nate Smith
c5c83bfb9d
Merge pull request #4654 from cli/issue-4590
add base repo resolution to archive
2021-11-17 15:23:18 -06:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Nate Smith
b5d90e1204
Merge pull request #4588 from cli/bin-ext-migrate
binary extension migration
2021-11-17 13:22:28 -06:00
Meijke
0a0a358168
rewrite gh repo create (#4578)
Co-authored-by: Parth Patel <ppatil91099@gmail.com>
2021-11-17 20:16:37 +01:00
nate smith
54b82dd072 Migrate to binary style extensions when detected 2021-11-17 13:15:04 -06:00
Nate Smith
6c12f34730
Merge pull request #4717 from cli/bin-ext-windows
fix binary extensions on windows
2021-11-17 12:57:12 -06:00
Amanda Lin
15c8f291e4
Add prebuild availability status to create codespaces (#4737) 2021-11-17 19:41:05 +01:00
nate smith
3bc4f4f5dd oops 2021-11-12 15:26:15 -06:00
nate smith
59d651b5ea xplatform test fix 2021-11-12 15:17:21 -06:00
nate smith
6b7889be6e fix binary extensions on windows 2021-11-12 14:29:56 -06:00
nate smith
a20ea17147 print success for installing extension 2021-11-12 12:29:53 -06:00
meiji163
35131058ed commit @samcoe's suggestions 2021-11-10 17:38:11 -08:00
meiji163
a1426ac19b implement samcoe's suggestions 2021-11-10 17:10:37 -08:00
Mislav Marohnić
dae77fd398
Merge pull request #4675 from cli/docs-web-formatting
Overhaul manual pages for the web
2021-11-09 21:00:51 +01:00
Jose Garcia
8296904c26
Rename errors from Live Share to generic codespace 2021-11-08 13:35:48 +00:00
Sam
67d1a9012c
Merge pull request #4450 from cli/repo-rename
gh repo rename
2021-11-04 10:52:22 -07:00
Boston Cartwright
dd0edc8fbd
Omit current directory when browse --branch is used with no file argument (#4676) 2021-11-04 15:00:42 +00:00