Closed skabashnyuk closed 3 years ago
api.github.com will require a token no ?
api.github.com will require a token no ?
@benoitf As far as I can see no. However, we might hit some token-less limits.
curl https://api.github.com/repos/eclipse/che/languages ✔ 7753 10:08:28
{
"Java": 8761634,
"JavaScript": 2477653,
"TypeScript": 1957177,
"HTML": 474145,
"CSS": 379435,
"Shell": 148933,
"TSQL": 65818,
"Groovy": 33116,
"SQLPL": 30977,
"FreeMarker": 22132,
"Dockerfile": 11379,
"Go": 2240,
"C++": 2025,
"Python": 1772,
"C#": 1735,
"Smarty": 1574,
"PHP": 1180,
"C": 407,
"Makefile": 22
}
@skabashnyuk yes I was more referencing the limits
using curl -v
< X-RateLimit-Limit: 60
< X-RateLimit-Remaining: 59
< X-RateLimit-Reset: 1580304687
there is only 60 requests available per hour (when not authenticated)
there is only 60 requests available per hour (when not authenticated)
Which is not that bad. +
We can try to use the user's github token if available or remember some previous decisions.
setting p1 as it's a big step forward to UX
I also think having auto-configuration would be really cool. We might use a number of indicators to help with creating a devfile by looking at a project: presence of configuration files (pom.xml, gradle.properties, package.json, etc.). But just knowing the language will not get us very far. What about Quarkus project, for example? I think two points would be good for implementation:
Come to think of it: why not use the activation event contributions for "workspaceContains" and "onLanguages" to match plugins to projects?
I just want to highlight google lang statistics are fairly bad at guessing in many cases so I think thiis should a a last fallback situation.
Could consider using github repo labels as a way to guess too.
But nothing will beat a basic introspection of files layout and content.
@maxandersen yeh. That is potentially possible.
curl -H "Accept: application/vnd.github.mercy-preview+json" https://api.github.com/repos/mgubaidullin/karamel/topics
{
"names": [
"java",
"quarkus",
"camel",
"qute",
"websockets",
"patternfly",
"kafka",
"strimzi",
"strimzi-operators"
]
}
Devfile 2.0 version https://github.com/devfile/kubernetes-api/issues/40
Issues go stale after 180
days of inactivity. lifecycle/stale
issues rot after an additional 7
days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale
in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen
label to avoid stale mode.
won't fix
Is your task related to a problem? Please describe.
At this moment if we are using a factory that points to github repository and this repository doesn't contain devfile which explains what is the workspace setup we are using default empty workspace with basic language capabilities.
Describe the solution you'd like
Github can provide a statistic about the code that is used in repository. We can use it to provide smarter defaults.
For example: if the percentage is grater 60% we can be sure which language to select
Describe alternatives you've considered
Do not autodetect the environment.
Additional context
https://github.com/eclipse/che/issues/14547