diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9b18782 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,29 @@ +# https://editorconfig.org/ +root = true + +[*] + charset = utf-8 + insert_final_newline = true + end_of_line = lf + quote_type = double + indent_style = space + indent_size = 4 + curly_bracket_next_line = false + spaces_around_operators = true + indent_brace_style = K&R + +[*.{js,jsx,json,jsonc,ts,tsx,html,vue,svelte,astro,css,scss,sass,less,lua,yml,yaml,md,mdx,mail,markdownlintrc,textlintrc}] + indent_size = 2 + +[*.{mail,sh,bash}] + max_line_length = 80 + +[COMMIT_EDITMSG] + max_line_length = 72 + +[Makefile] + indent_style = tab + +# https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd +[[shell]] + switch_case_indent = true diff --git a/.github/.release-please-manifest.json b/.github/release-please-manifest.json similarity index 100% rename from .github/.release-please-manifest.json rename to .github/release-please-manifest.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..43dd635 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: CI + +on: + push: + branches: [main, master] + pull_request: + +jobs: + ci: + uses: benelan/github/.github/workflows/ci.yml@main + secrets: inherit diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..7020c38 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,19 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: PR Title + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + - ready_for_review + +permissions: + pull-requests: read + +jobs: + pr-title: + uses: benelan/github/.github/workflows/pr.yml@main + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 216e3b1..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Release -on: - push: - branches: [main] -permissions: - contents: write - pull-requests: write - -jobs: - release-please: - name: release - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - config-file: .github/release-please-config.json - manifest-file: .github/.release-please-manifest.json - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ref: main - fetch-depth: 0 - fetch-tags: true - - name: tag stable versions - if: ${{ steps.release.outputs.release_created }} - run: | - git config user.name github-actions[bot] - git config user.email github-actions[bot]@users.noreply.github.com - git tag -d stable || true - git push origin :stable || true - git tag -a stable -m "Last Stable Release" - git push origin stable diff --git a/.markdownlintrc b/.markdownlintrc new file mode 100644 index 0000000..781544c --- /dev/null +++ b/.markdownlintrc @@ -0,0 +1,30 @@ +{ + "first-line-heading": false, + "no-emphasis-as-heading": false, + "no-inline-html": false, + "no-duplicate-heading": { + "siblings_only": true + }, + "blanks-around-fences": false, + "blanks-around-headings": false, + "blanks-around-lists": false, + "code-fence-style": false, + "emphasis-style": false, + "heading-start-left": false, + "hr-style": false, + "line-length": false, + "list-indent": false, + "list-marker-space": false, + "no-blanks-blockquote": false, + "no-hard-tabs": false, + "no-missing-space-atx": false, + "no-missing-space-closed-atx": false, + "no-multiple-blanks": false, + "no-multiple-space-atx": false, + "no-multiple-space-blockquote": false, + "no-multiple-space-closed-atx": false, + "no-trailing-spaces": false, + "ol-prefix": false, + "strong-style": false, + "ul-indent": false +} diff --git a/.textlintrc b/.textlintrc new file mode 100644 index 0000000..b08a6fd --- /dev/null +++ b/.textlintrc @@ -0,0 +1,15 @@ +{ + "filters": { + "comments": true + }, + "rules": { + "terminology": { + "exclude": [ + "JavaScript", + "TypeScript", + "repo\\b", + "bug[- ]fix(es)?" + ] + } + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a687025..2d4306f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ * **run:** Add `alt-w` keybind to filter by selected workflow ([48a29dd](https://github.com/benelan/gh-fzf/commit/48a29dd1447de2dcc14ee7feb69e8999537ae748)) * **ui:** Add second layout to `alt-P` preview toggling ([d77d364](https://github.com/benelan/gh-fzf/commit/d77d364bc59ba0252e869a5c0e4cf5c65048fd90)) * **ui:** Display command in fzf prompt ([66bbf1e](https://github.com/benelan/gh-fzf/commit/66bbf1e742747030b420e61754503f734f293a8a)) -* **workflow:** Add `ctrl-y` keybinding to copy file url ([2f478f2](https://github.com/benelan/gh-fzf/commit/2f478f26dd57a9b6c24222a6943affb9e05862ed)) +* **workflow:** Add `ctrl-y` keybinding to copy file URL ([2f478f2](https://github.com/benelan/gh-fzf/commit/2f478f26dd57a9b6c24222a6943affb9e05862ed)) * **workflow:** Add custom list formatting ([0a57814](https://github.com/benelan/gh-fzf/commit/0a57814dad10c985fcb7366bc1fdac0c106c09bf)) @@ -211,7 +211,7 @@ * Add `run`, `issue`, and `pr` commands ([9e254a0](https://github.com/benelan/gh-fzf/commit/9e254a05e3f230c1ab0a9474a6a186d1a13f92ba)) * Add `GH_FZF_DEFAULT_LIMIT` config option for setting the default list items limit ([71e9722](https://github.com/benelan/gh-fzf/commit/71e97227a62f3255d693c7cfc2366ea068a59a8e)) * Add `GH_FZF_HIDE_HINTS` config option to hide the header by default ([ed6b3d2](https://github.com/benelan/gh-fzf/commit/ed6b3d2265b7561bcdac97a60be26c9471939ac5)) -* Add `ctrl-y` keybinding for copying the item's url to the clipboard ([44bf38c](https://github.com/benelan/gh-fzf/commit/44bf38ca487c535c5f13568c9ada415d25c4588e)) +* Add `ctrl-y` keybinding for copying the item's URL to the clipboard ([44bf38c](https://github.com/benelan/gh-fzf/commit/44bf38ca487c535c5f13568c9ada415d25c4588e)) * Add `version` and `help` commands ([c20abc8](https://github.com/benelan/gh-fzf/commit/c20abc8933c9dccbbdb9685ce76ae817c68319d1)) * Display command picker when one is not provided ([ea326e1](https://github.com/benelan/gh-fzf/commit/ea326e1ba242d3affb513dd2320f0469ea5654b7)) * **issue, pr:** Add `alt-s` and `alt-b` keybindings to filter by "state=all" and the current branch, respectively ([0c2c377](https://github.com/benelan/gh-fzf/commit/0c2c3773432bf2f5093ff78badd1ee1dccffd769)) diff --git a/README.md b/README.md index 81e97be..3539536 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ An fzf wrapper around the GitHub CLI. + - [gh fzf](#gh-fzf) @@ -88,7 +89,7 @@ gh fzf changelog ## Usage ```sh -gh fzf [flags] +gh fzf \ [flags] ``` This extension adds a new command that wraps GitHub's `list` subcommands with @@ -251,14 +252,14 @@ that can be used with any `gh fzf` command: - `enter`: Download the assets from the selected release (see `gh release download --help`) - `alt-X`: Delete the selected release (see `gh release delete --help`) - - `alt-s`: Filter the list, showing stable releases (exclude pre-releases) + - `alt-s`: Filter the list, showing stable releases (exclude prereleases) - `alt-p`: Filter the list, showing published releases (exclude drafts) - `alt-a`: Filter the list, showing releases in ascending order by date (defaults to descending) - **Examples**: - - Filter the initial list to exclude drafts and pre-releases: + - Filter the initial list to exclude drafts and prereleases: ```sh - gh fzf release --exclude-drafts --exclude-pre-releases + gh fzf release --exclude-drafts --exclude-prereleases ``` ### `label` diff --git a/gh-fzf b/gh-fzf index b2b8251..7133bf4 100755 --- a/gh-fzf +++ b/gh-fzf @@ -74,28 +74,28 @@ An fzf wrapper around the GitHub CLI. Homepage: https://github.com/benelan/gh-fzf Usage: - gh fzf [flags] + gh fzf [flags] Core Commands: - issue Search for and interact with GitHub issues. - pr Search for and interact with GitHub pull requests. - run Search for and interact with GitHub Action runs. - workflow Search for and interact with GitHub Action workflows. - release Search for and interact with GitHub releases. - label Search for and interact with GitHub labels. - milestone Search for and interact with GitHub milestones via \`gh api\`. - repo Search for and interact with GitHub repos. - gist Search for and interact with GitHub gists. + issue Search for and interact with GitHub issues. + pr Search for and interact with GitHub pull requests. + run Search for and interact with GitHub Action runs. + workflow Search for and interact with GitHub Action workflows. + release Search for and interact with GitHub releases. + label Search for and interact with GitHub labels. + milestone Search for and interact with GitHub milestones via \`gh api\`. + repo Search for and interact with GitHub repos. + gist Search for and interact with GitHub gists. See \`gh list --help\` for the flag options. Other Commands: - help Print this help message. - status Print GitHub's service status from https://githubstatus.com/ - version Print the version of gh-fzf. - changelog View gh-fzf's changelog via the release command. - upgrade Upgrade to the latest version of gh-fzf. - util Functions used internally that may be useful for scripting. + help Print this help message. + status Print GitHub's service status from https://githubstatus.com/ + version Print the version of gh-fzf. + changelog View gh-fzf's changelog via the release command. + upgrade Upgrade to the latest version of gh-fzf. + util Functions used internally that may be useful for scripting. Check out the project homepage for more information, such as keybindings, configuration, and examples.