-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Include repo
object when templating
#303
base: master
Are you sure you want to change the base?
Conversation
@BetaHuhn will you have time to review this soon? |
src/git.js
Outdated
@@ -123,7 +123,7 @@ export default class Git { | |||
|
|||
async getBaseBranch() { | |||
this.baseBranch = await execCmd( | |||
`git rev-parse --abbrev-ref HEAD`, | |||
`git branch --show-current`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kenodegard why are these changes to the git.js
file necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember, but it wouldn't appear necessary and can be reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in 2ddece4
8c82d01
to
2da9fa8
Compare
Hi, Any update for this great feature ? |
This change adds the
repo
object to every Nunjucks context for easier bulk templating.The way templating is currently defined makes it very verbose to template several repos, especially when trying to do relatively simple templating like injecting the repo name. We'd effectively need:
By pre-populating the context with the repo object we are able to simplify it and do the following instead: