The Wayback Machine - https://web.archive.org/web/20220318035542/https://github.com/helm/charts/pull/16354
Skip to content
This repository has been archived by the owner. It is now read-only.

Add .gitattributes to fix language stats bar #16354

Merged
merged 2 commits into from Sep 6, 2019

Conversation

abhishekjiitr
Copy link
Contributor

@abhishekjiitr abhishekjiitr commented Aug 15, 2019

What this PR does / why we need it:

Fixes the Github Language stats bar, in which currently language of files with extension tpl are being recognised as Smarty, which are actually just text files. It makes the smarty files being shown as 86.7% of the codebase

After the commit, the text files are ignored in the final stats by Github Linguist:

59.54%  Shell
25.44%  Python
8.80%   Go
4.48%   Dockerfile
1.72%   Makefile
0.01%   HTML
@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Aug 15, 2019

Hi @abhishekjiitr. Thanks for your PR.

I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>
@abhishekjiitr
Copy link
Contributor Author

@abhishekjiitr abhishekjiitr commented Aug 15, 2019

/assign @prydonius

@prydonius
Copy link
Member

@prydonius prydonius commented Aug 30, 2019

Oh nice, thanks @abhishekjiitr! I'm wondering if it makes sense to have the .tpl files recognised as Go or YAML instead of Text? WDYT?

@abhishekjiitr
Copy link
Contributor Author

@abhishekjiitr abhishekjiitr commented Aug 30, 2019

I think Go makes more sense because the tpl files are essentially Golang Template Code.

The Github Linguist doesn't support specifying YAML though. The complete list of languages supported by it can be found here.

@prydonius
Copy link
Member

@prydonius prydonius commented Aug 31, 2019

Hmm it does look like YAML is in that list: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L5864.

But yes, I agree Go makes more sense, though I'm not sure if Linguist understands Go templates and if it will be able to highlight them properly, in any case I don't think it matters for the stats bar.

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>
@abhishekjiitr
Copy link
Contributor Author

@abhishekjiitr abhishekjiitr commented Aug 31, 2019

Added commit to recognize .tpl files as Go Code. But you are right, it will not be able to highlight those files properly.

@prydonius
Copy link
Member

@prydonius prydonius commented Sep 6, 2019

thanks!

/lgtm

@k8s-ci-robot
Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Sep 6, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhishekjiitr, prydonius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit a54490a into helm:master Sep 6, 2019
6 checks passed
kengou added a commit to kengou/charts that referenced this issue Sep 18, 2019
* Add .gitattributes to fix language stats bar

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>

* Mark TPL Extension as Go Code

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>
ramkumarvs pushed a commit to yugabyte/charts-helm-fork that referenced this issue Sep 30, 2019
* Add .gitattributes to fix language stats bar

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>

* Mark TPL Extension as Go Code

Signed-off-by: Abhishek Jaisingh <abhi2254015@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.