Comments (7)
@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.
@xakraz I will implement this feature this week or next week. I'm sorry for the delay in response.
from codegpt.
@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.
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.
bump new version v0.2.1
from codegpt.
https://github.com/appleboy/CodeGPT/releases/tag/v0.2.1
from codegpt.
So many thanks 🙏🏻
from codegpt.
Related Issues (20)
- Cant upgrade 0.4.3 HOT 2
- Exceeding ChatGPT API Context Length HOT 1
- zh-tw commit summary show ### HOT 2
- Prompt issue: The commit message contains "請注意保留原有格式。" HOT 7
- [Suggestion] Provide "codegpt config list" to list all config settings HOT 3
- Chocolatey package: CodeGPT HOT 18
- codegpt config set does not update .codegpt.yaml HOT 5
- How to deal with large git diff that over model's maximum context length limit? HOT 3
- Make `codegpt commit` command trigger the git pre-commit hook HOT 7
- essage: invalid character '<' looking for beginning of value HOT 11
- Error Message: Post "https://api.openai.com/v1/chat/completions": net/http: request canceled (Client.Timeout exceeded while awaiting headers) HOT 3
- Support Claude 2 Model
- Support gpt-4-1106-preview model HOT 3
- Traditional Chinese commit messages issues HOT 1
- `codegpt hook` should list sub-commands
- Feature request: `codegpt review --prompt_only`
- Feature request: Make prompt templates customizable HOT 1
- Large image appears in the cache HOT 1
- "Feature Request: Implement Shortcut Keys for Directory Level Navigation" HOT 1
- Support interactive Mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codegpt.