-
-
Notifications
You must be signed in to change notification settings - Fork 31
Fix issue #159: Pre-populate Navi Cheatsheets #165
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
base: main
Are you sure you want to change the base?
Changes from all commits
d4c2a0c
5adbae4
5f20798
9cca180
ed21aa2
3e93482
26e7cc4
c0de0aa
68b8344
b828549
1624c42
5746ecc
3ca9cc1
d08119d
877774a
2de78a8
1bff313
da4f024
e7642cf
9d07b26
666e8ff
03104ca
8dd8008
f89459b
f990379
5018fcf
4c022de
a9ab13a
c7cd9d2
8fe9fb0
a43be03
5f62c8b
72b3793
53a3136
7d3df60
d4746ea
ae829ce
2bb781e
ca301da
88bea6d
0ccd626
2d71564
f57d4b6
bac789e
0187d87
5d80a4c
bc993b2
fe645f1
b22f269
b4c6f24
22a9d73
e624c89
d85a367
d5fc1f0
4a97d9f
a345ddb
478f38f
c05aba9
7b205a7
4ae943b
10377b7
6e4376e
a2dcb77
742849c
ebce5da
01f83a2
6b0dd52
11f0b7f
20b43b2
80b3717
3c2b60f
db4fe09
bdbaa87
ad8c46a
8b5b0b4
77c3320
f092225
9649677
700652c
0eef0ce
1139969
4ce1cf6
a6c124b
d39dc39
0985d71
b6e0f06
d11f7a7
a92e5d5
194bbc2
3788445
921c82d
f8d7fa5
57dde68
39f3563
17f0cf7
99634cd
b790ffa
bf2c159
314454d
5c8195e
71d2bd8
2167459
ff8e8d9
ecbc318
a70241e
68ffa98
03c7e5a
29838ff
3fdcbf6
945bb8c
4359725
3d52f40
95426a3
2af38df
abc443b
baa8018
35314b5
20cef4a
c7b3d85
fc7a701
344c302
0537c70
e4ffbc5
ce419e2
8326538
748ec4f
748829a
f5ca732
30737da
e405943
bb50cc1
54c185a
de7a46c
1e7e95a
a1d68e3
ddc25bb
a34b515
16ac1b6
5518dc9
3b7a894
cf09e29
2be57ab
e31b3fb
59650a4
c051118
3ba5e66
40def24
24c283b
557186a
2e413da
0ba1ff5
1615c27
ae0eb09
382a8fb
bf5c079
680048b
d926c5e
67c4a81
73e0dc3
2ba6fe6
485e922
bdb8af4
520b361
c761e72
7eb5187
cd9b907
ec33275
33726c0
dea15e3
5a053c4
459d06e
38ed61a
26aa6c3
601498b
5cb0f6e
99d4a04
9b2e85f
7d8a91c
1136912
3fae990
c61f420
d77ea08
75deecc
bb69ed8
79c87a0
657bb06
d8595bd
9ddadba
5a4d5b4
8b5fbe9
121cebd
0cec6b6
1a4783c
6c88282
d231485
4c1f6b5
48314f0
bca2031
4fdedd8
f7979fa
e84208d
d74f2d1
b385d17
47e14e7
afa6ef2
4468db4
8ee1864
f8ea632
9a1ff6d
173c596
c9ab8cf
65495e6
28ce475
12081e0
8f7bb8a
1feec6c
80cc061
b2374db
f029700
c6fcb4e
56a23b7
7d768d8
820d1e9
b80e492
2ce2b7d
7c55d56
d26a9f1
9589bb2
c4929cc
89cdf06
4d16b42
8762d1b
3f6fa75
45565ff
55feb30
d5f8887
46c52fd
c6265e0
9a20e9b
2294843
b877ae3
6031f50
b95de42
5185f3d
e394d9e
ef6b5f7
b162363
46878e7
374a41a
ceeb0ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| test |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| [flake8] | ||
| exclude = .autodoc, .cache, .common, .config, .git, .modules, .npm, .pnpm-store, .shared, .task, .venv, .vscode, build, dist, node_modules, roles, venv | ||
| ignore = E402 | ||
| exclude = ".autodoc, .cache, .common, .config, .git, .modules, .npm, .pnpm-store, .shared, .task, .venv, .vscode, build, dist, node_modules, roles, venv" | ||
| ignore = "E402" | ||
| max-line-length = 120 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,12 +21,12 @@ if [ -f "$(dirname "$0")/_/husky.sh" ]; then | |
| logger info 'This git hook is configured to run even when --no-verify is used. In order to bypass this prompt, use the -n flag instead.' | ||
| logger info 'Opening a `git commit` dialog' | ||
| if ! type pnpx > /dev/null && type npm > /dev/null; then | ||
| npm install -g pnpm | ||
| npm install --no-progress -g pnpm | ||
| elif ! type pnpx > /dev/null; then | ||
| logger error '`pnpm` or `npm` must be installed' | ||
| fi | ||
| if ! type git-cz &> /dev/null; then | ||
| pnpm install -g commitizen | ||
| pnpm install --no-progress -g commitizen | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| fi | ||
| exec < /dev/tty && (git-cz --hook || true) | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ | |
| # If the `docker` environment variable is not set, the script / library will ensure both Gum and Glow are installed. | ||
|
|
||
| # @description Installs glow (a markdown renderer) from GitHub releases | ||
| # @example installGlow | ||
| installGlow() { | ||
| # TODO: Add support for other architecture types | ||
| if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then | ||
|
|
@@ -57,13 +56,20 @@ installGlow() { | |
| } | ||
|
|
||
| # @description Installs gum (a logging CLI) from GitHub releases | ||
| # @example installGum | ||
| installGum() { | ||
| # TODO: Add support for other architecture types | ||
| if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_Darwin_x86_64.tar.gz" | ||
| if [ "$(uname -r)" == "arm64" ]; then | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Darwin_arm64.tar.gz" | ||
| else | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Darwin_x86_64.tar.gz" | ||
| fi | ||
| elif [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_linux_x86_64.tar.gz" | ||
| if [ "$(uname -r)" == "arm64" ]; then | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Linux_arm64.tar.gz" | ||
| else | ||
| GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Linux_x86_64.tar.gz" | ||
| fi | ||
|
Comment on lines
59
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code checks for the architecture of the system and downloads the appropriate version of Gum. However, it assumes that only if [ "$(uname -r)" == "arm64" ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Darwin_arm64.tar.gz"
else
+ if [ "$(uname -r)" == "x86_64" ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.14.5/gum_0.14.5_Darwin_x86_64.tar.gz"
+ else
+ echo "Unsupported architecture: $(uname -r)"
+ exit 1
+ fi
fi |
||
| fi | ||
| if type curl &> /dev/null; then | ||
| if { [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; } || [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then | ||
|
|
@@ -117,7 +123,6 @@ if [ -n "$SEMANTIC_RELEASE" ]; then | |
| fi | ||
|
|
||
| # @description Logs using Node.js | ||
| # @example logger info "An informative log" | ||
| logger() { | ||
| if [ "$1" == 'error' ]; then | ||
| "$GUM_PATH" style --border="thick" "$("$GUM_PATH" style --foreground="#ff0000" "✖") $("$GUM_PATH" style --bold --background="#ff0000" --foreground="#ffffff" " ERROR ") $("$GUM_PATH" style --bold "$(format "$2")")" | ||
|
|
@@ -171,7 +176,6 @@ format() { | |
| } | ||
|
|
||
| # @description Display prompt that allows you to choose between options | ||
| # @example RESPONSE="$(.config/log choose "file.png" "another-file.jpg")" | ||
| choose() { | ||
| if type gum &> /dev/null; then | ||
| CHOOSE_ARGS="gum choose" | ||
|
|
@@ -185,7 +189,6 @@ choose() { | |
| } | ||
|
|
||
| # @description Display a confirmation prompt that returns an exit code if "No" is selected | ||
| # @example RESPONSE="$(.config/log confirm "Are you sure?" "Yeah" "Naa")" | ||
| confirm() { | ||
| if type gum &> /dev/null; then | ||
| GUM_OPTS="" | ||
|
|
@@ -211,7 +214,6 @@ confirm() { | |
| } | ||
|
|
||
| # @description Logs an error message | ||
| # @example .config/log error "Something happened!" | ||
| error() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -223,7 +225,6 @@ error() { | |
| } | ||
|
|
||
| # @description Display a filterable prompt that is populated with options from a text file | ||
| # @example echo Strawberry >> flavors.text && echo Banana >> flavors.text && RESPONSE="$(.config/log filter flavors.txt)" | ||
| filter() { | ||
| if type gum &> /dev/null; then | ||
| TMP="$(mktemp)" | ||
|
|
@@ -234,7 +235,6 @@ filter() { | |
| } | ||
|
|
||
| # @description Logs an info message | ||
| # @example .config/log info "Here is some information" | ||
| info() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -246,7 +246,6 @@ info() { | |
| } | ||
|
|
||
| # @description Displays an input with masked characters | ||
| # @example INPUT="$(.config/log input 'Enter the value..')" | ||
| input() { | ||
| if type gum &> /dev/null; then | ||
| if [ -n "$1" ]; then | ||
|
|
@@ -260,8 +259,6 @@ input() { | |
| } | ||
|
|
||
| # @description Logs a message written in markdown | ||
| # @example .config/log md "[styled_link](https://google.com)" | ||
| # @example .config/log md mymarkdown/file.md | ||
| md() { | ||
| if [ ! -f "$1" ]; then | ||
| echo "ERROR: A markdown file must be passed in as the parameter" && exit 1 | ||
|
|
@@ -272,7 +269,6 @@ md() { | |
| } | ||
|
|
||
| # @description Displays an input with masked characters | ||
| # @example PASSWORD="$(.config/log password 'Enter the Ansible vault password')" | ||
| password() { | ||
| if type gum &> /dev/null; then | ||
| if [ -n "$1" ]; then | ||
|
|
@@ -286,7 +282,6 @@ password() { | |
| } | ||
|
|
||
| # @description Logs a message that describes a prompt | ||
| # @example .config/log prompt "Enter text into the following prompt" | ||
| prompt() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -298,7 +293,6 @@ prompt() { | |
| } | ||
|
|
||
| # @description Display a spinner that stays until a command is completed | ||
| # @example .config/log spin "brew install yq" "Installing yq..")" | ||
| spin() { | ||
| if type gum &> /dev/null; then | ||
| if [ -n "$1" ] && [ -n "$2" ]; then | ||
|
|
@@ -314,7 +308,6 @@ spin() { | |
| } | ||
|
|
||
| # @description Logs a message that starts with a star emoji | ||
| # @example .config/log star "Congratulations" | ||
| star() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -326,7 +319,6 @@ star() { | |
| } | ||
|
|
||
| # @description Logs a message at the beginning of a task | ||
| # @example .config/log start "Starting the process.." | ||
| start() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -338,7 +330,6 @@ start() { | |
| } | ||
|
|
||
| # @description Logs a success message | ||
| # @example .config/log success "Yay!" | ||
| success() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -350,7 +341,6 @@ success() { | |
| } | ||
|
|
||
| # @description Logs a warning message | ||
| # @example .config/log warn "Just so you know.." | ||
| warn() { | ||
| if [ -z "$NO_LOGGING" ]; then | ||
| if [ -n "$ENHANCED_LOGGING" ]; then | ||
|
|
@@ -362,7 +352,6 @@ warn() { | |
| } | ||
|
|
||
| # @description Displays a multi-line prompt for text input | ||
| # @example .config/log write "Write something..")" | ||
| write() { | ||
| if type gum &> /dev/null; then | ||
| if [ -n "$1" ]; then | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -256,6 +256,11 @@ tasks: | |
| - > | ||
| readme generate --headingPrefix '{}' --silent --config .variables.json | ||
| --input ".config/docs/{{.README_TEMPLATE}}" | ||
| - | | ||
| if [ -f docs/img/logo-full.png ]; then | ||
| sed -i 's/\/-\/raw\/master\/logo.png/\/-\/raw\/master\/docs\/img\/logo-full.png/' README.md | ||
| sed -i 's/width="148" height="148"/height="69"/' README.md | ||
| fi | ||
|
Comment on lines
+259
to
+263
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of Here's a way to do it that should work on both Linux and macOS: - sed -i 's/\/-\/raw\/master\/logo.png/\/-\/raw\/master\/docs\/img\/logo-full.png/' README.md
- sed -i 's/width="148" height="148"/height="69"/' README.md
+ sed -i.bak 's/\/-\/raw\/master\/logo.png/\/-\/raw\/master\/docs\/img\/logo-full.png/' README.md && rm README.md.bak
+ sed -i.bak 's/width="148" height="148"/height="69"/' README.md && rm README.md.bakThis change uses the |
||
| - task: markdown:scrub | ||
| vars: | ||
| SCRUB_FILE: README.md | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,10 +134,10 @@ tasks: | |
| sh: mktemp | ||
| cmds: | ||
| - | | ||
| curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}' | ||
| export ZXXXY="$(yq e '.' {{.MODEL_TMP}})" | ||
| curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}.yml' | ||
| export ZXXXY="$(yq e '.' {{.MODEL_TMP}}.yml)" | ||
| yq e -i '. | .vars = (env(ZXXXY) | .vars) | .env = (env(ZXXXY) | .env)' Taskfile.yml | ||
| yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}' Taskfile.yml | ||
| yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}.yml' Taskfile.yml | ||
|
Comment on lines
+137
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of Consider adding error checking after each command execution to ensure that each step is successful before proceeding to the next one. This will make your script more robust and easier to debug in case of failures. Here's an example of how you might add error checking: - curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}.yml'
- export ZXXXY="$(yq e '.' {{.MODEL_TMP}}.yml)"
- yq e -i '. | .vars = (env(ZXXXY) | .vars) | .env = (env(ZXXXY) | .env)' Taskfile.yml
- yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}.yml' Taskfile.yml
+ curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}.yml' || { echo "Failed to download model taskfile"; exit 1; }
+ export ZXXXY="$(yq e '.' {{.MODEL_TMP}}.yml)" || { echo "Failed to parse model taskfile"; exit 1; }
+ yq e -i '. | .vars = (env(ZXXXY) | .vars) | .env = (env(ZXXXY) | .env)' Taskfile.yml || { echo "Failed to update vars and env in Taskfile.yml"; exit 1; }
+ yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}.yml' Taskfile.yml || { echo "Failed to merge model taskfile into Taskfile.yml"; exit 1; }This way, if any command fails, the script will stop execution and print an error message, making it easier to identify and fix the issue. |
||
|
|
||
| requirements: | ||
| deps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,11 +277,11 @@ tasks: | |
| start: Running Prettier on {{if .CLI_ARGS}}`{{.CLI_ARGS}}`{{else}}project{{end}} | ||
| cmds: | ||
| - cmd: | | ||
| prettier --plugin node_modules/prettier-plugin-toml-fixed --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ | ||
| prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ | ||
| --write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} || EXIT_CODE=$? | ||
| if [ -n "$EXIT_CODE" ]; then | ||
| .config/log warn 'Failed to run `prettier` - falling back to `prettier`' | ||
| prettier --plugin node_modules/prettier-plugin-toml-fixed --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ | ||
| prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ | ||
|
Comment on lines
+280
to
+284
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fallback - cmd: |
prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \
--write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
.config/log warn 'Failed to run `prettier` - falling back to `prettier`'
- prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \
+ prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} --write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} || FALLBACK_EXIT_CODE=$?
+ if [ -n "$FALLBACK_EXIT_CODE" ]; then
+ .config/log error 'Fallback `prettier` also failed'
+ fi
fi
ignore_error: trueThis change ensures that if the fallback |
||
| --write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} | ||
| fi | ||
| ignore_error: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,9 @@ tasks: | |
| # remote_ref -> refs/heads/master | ||
| # remote_sha -> 9901a2eb2f34d5744276a80c4b339a88a92a7b53 | ||
| REMOTE_BRANCH="$(echo $remote_ref | sed 's/^[^\/]*\/[^\/]*\///')" | ||
| if [ "$(echo "$HOST" | cut -c1-8)" == 'https://' ]; then | ||
| HOST="$(echo "$HOST" | cut -c8)" | ||
| fi | ||
|
Comment on lines
+91
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seems to be a mistake in the way you're trying to remove 'https://' from the HOST variable. The - if [ "$(echo "$HOST" | cut -c1-8)" == 'https://' ]; then
- HOST="$(echo "$HOST" | cut -c8)"
- fi
+ if [[ "$HOST" == https://* ]]; then
+ HOST="${HOST#https://}"
+ fiThis change will correctly remove 'https://' from the start of the HOST variable if it exists. |
||
| .config/log star "Repository -----> https://$HOST/$ORG/$PROJECT" | ||
| if [ "$HOST" == 'gitlab.com' ]; then | ||
| if [ "$REMOTE_BRANCH" != 'master' ]; then | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Code Review | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| on: | ||
| pull_request: | ||
| pull_request_review_comment: | ||
| types: [created] | ||
|
|
||
| concurrency: | ||
| group: | ||
| ${{ github.repository }}-${{ github.event.number || github.head_ref || | ||
| github.sha }}-${{ github.workflow }}-${{ github.event_name == | ||
| 'pull_request_review_comment' && 'pr_comment' || 'pr' }} | ||
| cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: fluxninja/openai-pr-reviewer@latest | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| with: | ||
| debug: false | ||
| review_simple_changes: false | ||
| review_comment_lgtm: false | ||
|
Comment on lines
+1
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The workflow file seems to be well structured and follows the standard GitHub Actions syntax. However, there is a missing newline at the end of the file. It's a common convention to end files with a newline because some tools might not handle or display the last line correctly if it doesn't end with a newline. review_comment_lgtm: false
+ \ No newline at end of fileAlso, please ensure that the |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Resolve Issue with OpenHands | ||
|
|
||
| on: | ||
| issues: | ||
| types: [labeled] | ||
| pull_request: | ||
| types: [labeled] | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| issues: write | ||
|
|
||
| jobs: | ||
| call-openhands-resolver: | ||
| uses: All-Hands-AI/OpenHands/.github/workflows/openhands-resolver.yml@main | ||
| with: | ||
| macro: ${{ vars.OPENHANDS_MACRO || '@openhands-agent' }} | ||
| max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }} | ||
| base_container_image: ${{ vars.OPENHANDS_BASE_CONTAINER_IMAGE || '' }} | ||
| LLM_MODEL: ${{ vars.LLM_MODEL || 'anthropic/claude-sonnet-4-20250514' }} | ||
| target_branch: ${{ vars.TARGET_BRANCH || 'main' }} | ||
| runner: ${{ vars.TARGET_RUNNER }} | ||
| secrets: | ||
| PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | ||
| PAT_USERNAME: ${{ secrets.PAT_USERNAME }} | ||
| LLM_API_KEY: ${{ secrets.LLM_API_KEY }} | ||
| LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }} | ||
|
Comment on lines
+1
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new GitHub workflow seems to be well configured. However, it's important to ensure that the secrets used in this workflow (PAT_TOKEN, PAT_USERNAME, LLM_API_KEY, LLM_BASE_URL) are properly set up in the repository settings. If these secrets are not set, the workflow will fail. Also, make sure that the permissions granted in lines 15-18 are necessary and minimal for the tasks performed by the workflow to follow the principle of least privilege. permissions:
contents: write
pull-requests: write
issues: writeIn addition, consider adding a failure case or error handling mechanism to this workflow. Currently, if any step fails, the workflow might stop without providing meaningful feedback about what went wrong. This could make debugging more difficult. Lastly, please ensure that the runner: ${{ vars.TARGET_RUNNER }} |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
npm installcommand is being run with the--no-progressflag, which suppresses the progress bar. This might not be ideal for all users as it could make it harder to understand what's happening during the installation process. Consider removing this flag or making its usage configurable.