GithubHelp home page GithubHelp logo

❓Templating capabilities about codegpt HOT 7 CLOSED

appleboy avatar appleboy commented on May 23, 2024
❓Templating capabilities

from codegpt.

Comments (7)

appleboy avatar appleboy commented on May 23, 2024 1

@xakraz Thanks for your feedback. Could you describe the detailed use case and how to achieve the purpose?

maybe add a new flag --template_vars

codegpt commit --preview --template_file your_file_path --template_vars your_env_path

from codegpt.

appleboy avatar appleboy commented on May 23, 2024 1

@xakraz I will implement this feature this week or next week. I'm sorry for the delay in response.

from codegpt.

xakraz avatar xakraz commented on May 23, 2024

@appleboy Yes that would be super useful! 🙏🏻

I don't know the complexity it might add to your code base but if it could also support cli-provided values like --template-vars VAR1=value,VAR2=value,VAR3=value that would be awesome! 😃

(--template_vars and --template_vars_file)

As I said earlier, we need to pass the Jira issue ID as part of the commit subject for later automation.
So by example

codegpt commit --preview --template_file your_file_path --template_vars "TICKET_ID=ABC-1234"

Many thanks again for your time spent on this request 🙏🏻

from codegpt.

appleboy avatar appleboy commented on May 23, 2024

Add custom variable to git commit message template:

{{ .summarize_prefix }}: {{ .summarize_title }}

{{ .summarize_message }}

{{ if .JIRA_URL }}{{ .JIRA_URL }}{{ end }}

Add custom variable to git commit message template using --template_vars parameter:

codegpt commit --preview --template_file your_file_path --template_vars JIRA_URL=https://jira.example.com/ABC-123

Load custom variable from file using --template_vars_file parameter:

codegpt commit --preview --template_file your_file_path --template_vars_file your_file_path

See the template_vars_file format as following:

JIRA_URL=https://jira.example.com/ABC-123

from codegpt.

appleboy avatar appleboy commented on May 23, 2024

bump new version v0.2.1

from codegpt.

appleboy avatar appleboy commented on May 23, 2024

https://github.com/appleboy/CodeGPT/releases/tag/v0.2.1

from codegpt.

xakraz avatar xakraz commented on May 23, 2024

So many thanks 🙏🏻

from codegpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.