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

Support changing template #793

Open
suzuki-shunsuke opened this issue Feb 13, 2023 · 0 comments
Open

Support changing template #793

suzuki-shunsuke opened this issue Feb 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Owner

When -k isn't specified, the template default is used at the moment.
You can't change the template dynamically.

In this proposal, we support changing the template dynamically according to the command line arguments and executed command result.

Drawback of this idea

if condition may be broken unexpectedly.
For example, if: Command startsWith "gh issue create" doesn't match gh -R suzuki-shunsuke/github-comment issue create.

Example

e.g.

exec_if:
- if: Command startsWith "tfmigrate plan"
  template_key: tfmigrate-plan
exec:
  tfmigrate-plan:
  - when: true
    template: |
      ## {{template "status" .}} {{if .Vars.tfaction_target}}{{.Vars.tfaction_target}}: {{end}} tfmigrate plan
      {{template "link" .}}
      {{template "join_command" .}}
      {{template "hidden_combined_output" .}}
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant