forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
* upstream/main: Changelog 1.18.5 (go-gitea#23045) (go-gitea#23049) Add Bash and Zsh completion scripts (go-gitea#22646) Return empty url for submodule tree entries (go-gitea#23043) Fix the show/hide methods for string selector (go-gitea#23042) display attachments of review comment when comment content is blank (go-gitea#23035) Upgrade to stylelint 15 (go-gitea#22944) Add force_merge to merge request and fix checking mergable (go-gitea#23010) Improve PR Review Box UI (go-gitea#22986) Remove dashes between organization member avatars on hover (go-gitea#23034) Fix the Manually Merged form (go-gitea#23015) Remove delete button for review comment (go-gitea#23036) Improve frontend guidelines (go-gitea#23007) Use `--message=%s` for git commit message (go-gitea#23028)
- Loading branch information
Showing
41 changed files
with
518 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,133 @@ | ||
extends: stylelint-config-standard | ||
|
||
plugins: | ||
- stylelint-declaration-strict-value | ||
|
||
overrides: | ||
- files: ["**/*.less"] | ||
customSyntax: postcss-less | ||
- files: ["**/*.less"] | ||
rules: | ||
scale-unlimited/declaration-strict-value: [color, { | ||
ignoreValues: /^(inherit|transparent|unset|initial)$/ | ||
}] | ||
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"] | ||
rules: | ||
scale-unlimited/declaration-strict-value: null | ||
|
||
rules: | ||
alpha-value-notation: null | ||
annotation-no-unknown: true | ||
at-rule-allowed-list: null | ||
at-rule-disallowed-list: null | ||
at-rule-empty-line-before: null | ||
block-closing-brace-empty-line-before: null | ||
at-rule-no-unknown: true | ||
at-rule-no-vendor-prefix: true | ||
at-rule-property-required-list: null | ||
block-no-empty: true | ||
color-function-notation: null | ||
color-hex-alpha: null | ||
color-hex-length: null | ||
color-named: null | ||
color-no-hex: null | ||
color-no-invalid-hex: true | ||
comment-empty-line-before: null | ||
comment-no-empty: true | ||
comment-pattern: null | ||
comment-whitespace-inside: null | ||
comment-word-disallowed-list: null | ||
custom-media-pattern: null | ||
custom-property-empty-line-before: null | ||
custom-property-no-missing-var-function: true | ||
custom-property-pattern: null | ||
declaration-block-no-duplicate-custom-properties: true | ||
declaration-block-no-duplicate-properties: [true, {ignore: [consecutive-duplicates-with-different-values]}] | ||
declaration-block-no-redundant-longhand-properties: null | ||
declaration-block-no-shorthand-property-overrides: null | ||
declaration-block-single-line-max-declarations: null | ||
declaration-empty-line-before: null | ||
declaration-no-important: null | ||
declaration-property-max-values: null | ||
declaration-property-unit-allowed-list: null | ||
declaration-property-unit-disallowed-list: null | ||
declaration-property-value-allowed-list: null | ||
declaration-property-value-disallowed-list: null | ||
declaration-property-value-no-unknown: true | ||
font-family-name-quotes: always-where-recommended | ||
font-family-no-duplicate-names: true | ||
font-family-no-missing-generic-family-keyword: true | ||
font-weight-notation: null | ||
function-allowed-list: null | ||
function-calc-no-unspaced-operator: true | ||
function-disallowed-list: null | ||
function-linear-gradient-no-nonstandard-direction: true | ||
function-name-case: lower | ||
function-no-unknown: null | ||
function-url-no-scheme-relative: null | ||
function-url-quotes: always | ||
function-url-scheme-allowed-list: null | ||
function-url-scheme-disallowed-list: null | ||
hue-degree-notation: null | ||
import-notation: string | ||
indentation: 2 | ||
max-line-length: null | ||
keyframe-block-no-duplicate-selectors: true | ||
keyframe-declaration-no-important: true | ||
keyframe-selector-notation: null | ||
keyframes-name-pattern: null | ||
length-zero-no-unit: true | ||
max-nesting-depth: null | ||
media-feature-name-allowed-list: null | ||
media-feature-name-disallowed-list: null | ||
media-feature-name-no-unknown: true | ||
media-feature-name-no-vendor-prefix: true | ||
media-feature-name-unit-allowed-list: null | ||
media-feature-name-value-allowed-list: null | ||
media-feature-range-notation: null | ||
named-grid-areas-no-invalid: true | ||
no-descending-specificity: null | ||
no-duplicate-at-import-rules: true | ||
no-duplicate-selectors: true | ||
no-empty-source: true | ||
no-invalid-double-slash-comments: true | ||
no-invalid-position-at-import-rule: null | ||
number-leading-zero: never | ||
no-irregular-whitespace: true | ||
no-unknown-animations: null | ||
number-max-precision: null | ||
property-allowed-list: null | ||
property-disallowed-list: null | ||
property-no-unknown: true | ||
property-no-vendor-prefix: null | ||
rule-empty-line-before: null | ||
rule-selector-property-disallowed-list: null | ||
scale-unlimited/declaration-strict-value: [color, {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor)$/}] | ||
selector-attribute-name-disallowed-list: null | ||
selector-attribute-operator-allowed-list: null | ||
selector-attribute-operator-disallowed-list: null | ||
selector-attribute-quotes: always | ||
selector-class-pattern: null | ||
selector-combinator-allowed-list: null | ||
selector-combinator-disallowed-list: null | ||
selector-disallowed-list: null | ||
selector-id-pattern: null | ||
selector-max-attribute: null | ||
selector-max-class: null | ||
selector-max-combinators: null | ||
selector-max-compound-selectors: null | ||
selector-max-id: null | ||
selector-max-pseudo-class: null | ||
selector-max-specificity: null | ||
selector-max-type: null | ||
selector-max-universal: null | ||
selector-nested-pattern: null | ||
selector-no-qualifying-type: null | ||
selector-no-vendor-prefix: true | ||
selector-not-notation: null | ||
selector-pseudo-class-allowed-list: null | ||
selector-pseudo-class-disallowed-list: null | ||
selector-pseudo-class-no-unknown: true | ||
selector-pseudo-element-allowed-list: null | ||
selector-pseudo-element-colon-notation: double | ||
selector-pseudo-element-disallowed-list: null | ||
selector-pseudo-element-no-unknown: true | ||
selector-type-case: lower | ||
selector-type-no-unknown: [true, {ignore: [custom-elements]}] | ||
shorthand-property-no-redundant-values: true | ||
string-quotes: null | ||
value-no-vendor-prefix: null | ||
string-no-newline: true | ||
time-min-milliseconds: null | ||
unit-allowed-list: null | ||
unit-disallowed-list: null | ||
unit-no-unknown: true | ||
value-keyword-case: null | ||
value-no-vendor-prefix: [true, {ignoreValues: [box, inline-box]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Bash and Zsh completion | ||
======================= | ||
|
||
From within the gitea root run: | ||
|
||
```bash | ||
source contrib/autocompletion/bash_autocomplete | ||
``` | ||
|
||
or for zsh run: | ||
|
||
```bash | ||
source contrib/autocompletion/zsh_autocomplete | ||
``` | ||
|
||
These scripts will check if gitea is on the path and if so add autocompletion for `gitea`. Or if not autocompletion will work for `./gitea`. | ||
If gitea has been installed as a different program pass in the `PROG` environment variable to set the correct program name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /bin/bash | ||
# Heavily inspired by https://github.com/urfave/cli | ||
|
||
_cli_bash_autocomplete() { | ||
if [[ "${COMP_WORDS[0]}" != "source" ]]; then | ||
local cur opts base | ||
COMPREPLY=() | ||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
if [[ "$cur" == "-"* ]]; then | ||
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion ) | ||
else | ||
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) | ||
fi | ||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | ||
return 0 | ||
fi | ||
} | ||
|
||
if [ -z "$PROG" ] && [ ! "$(command -v gitea &> /dev/null)" ] ; then | ||
complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete gitea | ||
elif [ -z "$PROG" ]; then | ||
complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete ./gitea | ||
complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete "$PWD/gitea" | ||
else | ||
complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete "$PROG" | ||
unset PROG | ||
fi | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#compdef ${PROG:=gitea} | ||
|
||
|
||
# Heavily inspired by https://github.com/urfave/cli | ||
|
||
_cli_zsh_autocomplete() { | ||
|
||
local -a opts | ||
local cur | ||
cur=${words[-1]} | ||
if [[ "$cur" == "-"* ]]; then | ||
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}") | ||
else | ||
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}") | ||
fi | ||
|
||
if [[ "${opts[1]}" != "" ]]; then | ||
_describe 'values' opts | ||
else | ||
_files | ||
fi | ||
|
||
return | ||
} | ||
|
||
if [ -z $PROG ] ; then | ||
compdef _cli_zsh_autocomplete gitea | ||
else | ||
compdef _cli_zsh_autocomplete $(basename $PROG) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.