Skip to content

Improve workflow to include all user languages in descending order#2

Merged
arhamkhnz merged 3 commits intoarhamkhnz:mainfrom
sathwikhbhat:enhancement/dynamic-languages-workflow
Aug 18, 2025
Merged

Improve workflow to include all user languages in descending order#2
arhamkhnz merged 3 commits intoarhamkhnz:mainfrom
sathwikhbhat:enhancement/dynamic-languages-workflow

Conversation

@sathwikhbhat
Copy link
Copy Markdown
Contributor

Description

  • This PR enhances the workflow YAML by replacing the hardcoded list of languages with a dynamic approach that:
  • Fetches all languages used by the user
  • Sorts them in descending order of usage
  • Updates the output to show a complete and accurate breakdown

Why is this change needed?

  • Previously, the workflow only displayed a fixed set of languages, which ignored others that the user may actively use.
  • With this change, the report better reflects the user’s actual coding activity.

Changes Made

  • Modified YAML configuration to fetch all languages instead of filtering on a static list
  • Added logic to sort languages by descending usage before outputting them

Closes #1

@arhamkhnz
Copy link
Copy Markdown
Owner

I’d say keep this configurable. In some cases users won’t want all languages printed. If languages are configured, use only those, otherwise print all.

@sathwikhbhat
Copy link
Copy Markdown
Contributor Author

I rightfully agree with you. However, not all users have JavaScript, Vue.js, PHP, C#, or JSX set as their default languages. So, when someone tries to use this workflow, they may get zeros for the languages listed above and then see 13,000 lines categorised under "Other Languages," which is not the preferred outcome.

It would be better to keep all languages and then, perhaps, include a section in the README explaining how to configure custom languages and how to ignore others.

@sathwikhbhat
Copy link
Copy Markdown
Contributor Author

Also, I just happened to notice that .py is included in your excluded list, while some important extensions like .xml and .csv are missing. Would you like me to raise a new issue and create a PR for that?

@arhamkhnz
Copy link
Copy Markdown
Owner

Instead of just pointing people to the README to change code, you can add INCLUDE_LANGS and EXCLUDE_LANGS vars (comma-separated). By default it’ll take all, but if someone wants to filter, they just set these. That way it covers multiple use cases without touching the workflow code. Also, fixes like .xml or other extensions can be handled here itself.

@sathwikhbhat
Copy link
Copy Markdown
Contributor Author

@arhamkhnz I believe I have completed everything as you mentioned earlier. Please acknowledge my PR.

Thank you.

@arhamkhnz
Copy link
Copy Markdown
Owner

I’ll review it soon.

@arhamkhnz arhamkhnz merged commit 429d0a8 into arhamkhnz:main Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance workflow: Show all languages dynamically instead of hardcoded list

2 participants