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

pass some arguments to all hooks #606

Open
sinanejadebrahim opened this issue Oct 9, 2022 · 0 comments
Open

pass some arguments to all hooks #606

sinanejadebrahim opened this issue Oct 9, 2022 · 0 comments

Comments

@sinanejadebrahim
Copy link

sinanejadebrahim commented Oct 9, 2022

hello, i wanted to know is there any way to pass multiple arguments to all hooks?
for example, this is my json file: which has two hooks

    {
    "id": "create_disk",
    "execute-command": "create_disk.sh",
    "pass-arguments-to-command":
    [
      {
        "source": "query",
        "name": "disk_name"
      },
      {
        "source": "query",
        "name": "disk_size"
      },
      {
        "source": "query",
        "name": "gmail"
      },
      {
        "source": "query",
        "name": "password"
      }
    ]

    {
    "id": "delete_server",
    "execute-command": "delete_server.sh",
    "pass-arguments-to-command":
    [
      {
        "source": "query",
        "name": "server_name"
      },
      {
        "source": "query",
        "name": "gmail"
      },
      {
        "source": "query",
        "name": "password"
      }
    ],

}

is there any way so that i don't need to repeat gmail and password argument for each hook?and they be passed to all hooks and all commands?
so my file would look something like this? + whatever i need to pass those two to all hooks?
so that I can pass these two + whatever arg is being passed in each hook


    {
    "id": "create_disk",
    "execute-command": "create_disk.sh",
    "pass-arguments-to-command":
    [
      {
        "source": "query",
        "name": "disk_name"
      },
      {
        "source": "query",
        "name": "disk_size"
      }
    ],
    {
    "id": "delete_server",
    "execute-command": "delete_server.sh",
    "pass-arguments-to-command":
    [
      {
        "source": "query",
        "name": "server_name"
      },
    ]

#### this is what i mean ####

    {
      "extra_args_for_all_hooks"
      "source": "query",
     "name": "gmail"
   }
  {
      "extra_args_for_all_hooks"
      "source": "query",
     "name": "password"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants