From ab5ff5515520e6c40cf4b30a129b6d3d5a5f016d Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnehzad Date: Wed, 6 Dec 2023 10:37:53 +0330 Subject: [PATCH 1/6] fix (wont crash if branch is incorrect --- action.nu | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/action.nu b/action.nu index 3b76385..b316ca6 100644 --- a/action.nu +++ b/action.nu @@ -135,7 +135,11 @@ export module plugin-list { ]: string -> record { let git_repo = $in # github repository url (e.g. https://github.com/FMotalleb/nu_plugin_port_scan) let toml_file_address: string = (get-raw-toml-address $git_repo $branch | url join) - return (http get --raw $toml_file_address | from toml) + try { + return (http get --raw $toml_file_address | from toml) + } catch { + return {} + } } # checks if given input is string or not @@ -160,15 +164,26 @@ export module plugin-list { repository: string ]: record -> record { let toml: record = $in - return { - name: $"[($toml.package.name)]\(($repository)\)" - version: $toml.package.version - description: $toml.package.description? - plugin: ($toml.dependencies.nu-plugin - | get self or version) - protocol: ($toml.dependencies.nu-protocol - | get self or version) + if ([$toml.package?, $toml.dependencies?] | all {|i| $i != null} ) { + return { + name: $"[($toml.package.name)]\(($repository)\)" + version: $toml.package.version + description: $toml.package.description? + plugin: ($toml.dependencies.nu-plugin + | get self or version) + protocol: ($toml.dependencies.nu-protocol + | get self or version) + } + } else { + return { + name: $"issue in config file for \(($repository)\)" + version: "0.0" + description: "" + plugin: "0.0" + protocol: "0.0" + } } + } def "get icon" []: int -> string { From 60c933737e6181be2adb7fedfe94aa19ac74f17b Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnehzad Date: Wed, 6 Dec 2023 10:40:43 +0330 Subject: [PATCH 2/6] workflow_dispatch --- .github/workflows/update-results.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-results.yaml b/.github/workflows/update-results.yaml index 5918454..cec1f73 100644 --- a/.github/workflows/update-results.yaml +++ b/.github/workflows/update-results.yaml @@ -2,6 +2,7 @@ on: # push: # branches: # - main + workflow_dispatch: schedule: - cron: '0 3 * * 3' # At 03:00 on Wednesday From 6c86f81a461905749fb94486b91b67ca6d62d16d Mon Sep 17 00:00:00 2001 From: GitHub-Action Date: Wed, 6 Dec 2023 07:11:17 +0000 Subject: [PATCH 3/6] Commit from GitHub Actions (Update plugin_details.md) --- plugin_details.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugin_details.md b/plugin_details.md index 54829aa..3fb20d1 100644 --- a/plugin_details.md +++ b/plugin_details.md @@ -1,5 +1,4 @@ -[table 35 rows] -EvalBlockWithInput(Span { start: 107689, end: 107693 }, [NetworkFailure("Requested file not found (404): \"https://raw.githubusercontent.com/hulthe/nu_plugin_msgpack/main/Cargo.toml\"", Span { start: 112246, end: 112264 })]) -EvalBlockWithInput(Span { start: 107689, end: 107693 }, [CantFindColumn { col_name: "plugin", span: Span { start: 114193, end: 114199 }, src_span: Span { start: 114186, end: 114192 } }]) +[table 36 rows] +EvalBlockWithInput(Span { start: 107690, end: 107694 }, [CantFindColumn { col_name: "plugin", span: Span { start: 114641, end: 114647 }, src_span: Span { start: 114634, end: 114640 } }]) -last update at `2023-12-06 03:09:55 +00:00` +last update at `2023-12-06 07:11:16 +00:00` From f56d6b87d09ea8e333ca3757465296df8a986379 Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnehzad Date: Wed, 6 Dec 2023 10:45:55 +0330 Subject: [PATCH 4/6] fix nu_plugin_bash_env --- action.nu | 3 +++ config.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/action.nu b/action.nu index b316ca6..ca84b83 100644 --- a/action.nu +++ b/action.nu @@ -209,6 +209,9 @@ export module plugin-list { ]: record -> record { let input = $in use version "compare to" + if ($input | is-empty) { + return $input + } if ((($input.plugin | compare to $min_plugin) == -1) or ($input.protocol | compare to $min_protocol) == -1) { return ($input | upsert plugin $"⛔($input.plugin)" diff --git a/config.yaml b/config.yaml index d633457..e9ad2a6 100644 --- a/config.yaml +++ b/config.yaml @@ -203,7 +203,12 @@ plugins: repository: url: https://github.com/tesujimath/nu_plugin_bash_env branch: main - + override: # override any field in the result record (do not use unless you have to `like the plugin is written in Python`) + name: "[nu_plugin_bash_env](https://github.com/tesujimath/nu_plugin_bash_env)" + version: "0.0.0" + description: "A Bash environment plugin for Nushell." + plugin: "0.0" + protocol: "0.0" # Example # - name: nu_plugin_bin_reader # the plugins name (mandatory) # language: python # programming language (mandatory) From 1e2916ea21306669f15cb6b1b22fe145cdd8f68c Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnehzad Date: Wed, 6 Dec 2023 10:47:45 +0330 Subject: [PATCH 5/6] minor --- config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index e9ad2a6..035e4c6 100644 --- a/config.yaml +++ b/config.yaml @@ -207,8 +207,8 @@ plugins: name: "[nu_plugin_bash_env](https://github.com/tesujimath/nu_plugin_bash_env)" version: "0.0.0" description: "A Bash environment plugin for Nushell." - plugin: "0.0" - protocol: "0.0" + plugin: "0.87" + protocol: "0.87" # Example # - name: nu_plugin_bin_reader # the plugins name (mandatory) # language: python # programming language (mandatory) From 3b79ed5982d304ed67d654b9c326fcff3b86ac3c Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnehzad Date: Wed, 6 Dec 2023 10:48:18 +0330 Subject: [PATCH 6/6] fix nu_plugin_bash_env --- config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index 035e4c6..ba08ec9 100644 --- a/config.yaml +++ b/config.yaml @@ -202,7 +202,7 @@ plugins: language: bash repository: url: https://github.com/tesujimath/nu_plugin_bash_env - branch: main + branch: master override: # override any field in the result record (do not use unless you have to `like the plugin is written in Python`) name: "[nu_plugin_bash_env](https://github.com/tesujimath/nu_plugin_bash_env)" version: "0.0.0"