Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(run): add keymap to download artifacts #6

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ An fzf wrapper around the GitHub CLI.
```

4. **[???](#usage)**

5. **PROFIT**

## Usage
Expand Down Expand Up @@ -162,6 +161,8 @@ that can be used with any `gh fzf` command:
(see `gh run watch --help`)
- `alt-l`: Display the logs for the selected run
(see `gh run view --help`)
- `alt-d`: Download artifacts from the selected run
(see `gh run download --help`)
- `alt-r`: Rerun the selected run
(see `gh run rerun --help`)
- `alt-x`: Cancel the selected run
Expand Down Expand Up @@ -204,11 +205,13 @@ aliases:
!FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS
--bind='alt-+:execute(gh issue edit --add-assignee @me {1})'
--bind='alt--:execute(gh issue edit --remove-assignee @me {1})'
" gh fzf issue
" gh fzf issue $*
p: |
!FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS
--bind='alt-+:execute(gh pr review --approve --body \":+1:\" {1})'
--bind='alt--:execute(gh pr review --request-changes {1})'
--bind='alt-m:execute(gh pr merge --delete-branch --squash {1})'
" gh fzf pr
" gh fzf pr $*
```

When adding or modifying fzf keybindings:
Expand Down
3 changes: 2 additions & 1 deletion gh-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ run_cmd() {
{{- end -}}
'\'''

run_header='Actions > (enter: watch) (alt-l: logs) (alt-r: rerun) (alt-x: cancel) (alt-p: pr)
run_header='Actions > (enter: watch) (alt-l: logs) (alt-r: rerun) (alt-x: cancel) (alt-p: pr) (alt-d: download)
> (ctrl-o: open url) (ctrl-y: copy url) (ctrl-r: reload)
Filters > (alt-f: failed runs) (alt-b: current branch) (alt-u: current user)

Expand All @@ -336,6 +336,7 @@ Filters > (alt-f: failed runs) (alt-b: current branch) (alt-u: current user)
--bind='enter:execute(gh run watch {-1})' \
--bind='alt-l:execute(gh run view --log {-1})' \
--bind='alt-r:execute(gh run rerun {-1})' \
--bind='alt-d:execute(gh run download {-1})' \
--bind='alt-x:execute(gh run cancel {-1})' \
--bind='alt-p:execute<gh fzf pr --head $(gh run view {-1} --json headBranch --jq .headBranch)>' \
--bind='alt-b:reload(eval "$FZF_DEFAULT_COMMAND --branch $(git symbolic-ref --short HEAD)")' \
Expand Down