FHIR Chat · Inserting branch name? · committers/git-help

Stream: committers/git-help

Topic: Inserting branch name?


view this post on Zulip Lloyd McKenzie (Feb 01 2020 at 00:18):

Is there a mechanism where I can get cause the name of the branch something is in to render into a file? When we publish a branch, it would be nice if the header for the publication showed the branch name...

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:21):

this is a thing of beauty: https://stackoverflow.com/questions/6245570/how-to-get-the-current-branch-name-in-git

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:22):

but you might not even be in a git context

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:31):

it looks like we should put in the IG publisher

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:39):

I'll put in fhir.json in _data - "gitstatus" - that means it will be available anywhere through liquid

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:41):

will have n/a in it if the source isn't from git

view this post on Zulip Lloyd McKenzie (Feb 01 2020 at 00:47):

Be better for it to be blank than n/a - makes rendering easier

view this post on Zulip Grahame Grieve (Feb 01 2020 at 00:48):

ok

view this post on Zulip Grahame Grieve (Feb 01 2020 at 01:07):

will work next release

view this post on Zulip Lloyd McKenzie (Feb 01 2020 at 01:40):

What will it display if you're on 'master' (ideal would also be blank...)

view this post on Zulip Grahame Grieve (Feb 01 2020 at 03:15):

"master"

view this post on Zulip Lloyd McKenzie (Feb 01 2020 at 03:25):

Do you want to put the logic to suppress that in the publisher, or should I write the logic to suppress it in the template? (Because we don't want 'master' appearing.)

view this post on Zulip Grahame Grieve (Feb 01 2020 at 03:36):

I think that's a template choice


Last updated: Apr 12 2022 at 19:14 UTC