Skip to content
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

Draft Create Auto Detect .gradle file during Java detection #224

Open
msftph opened this issue Jul 24, 2023 · 2 comments
Open

Draft Create Auto Detect .gradle file during Java detection #224

msftph opened this issue Jul 24, 2023 · 2 comments

Comments

@msftph
Copy link

msftph commented Jul 24, 2023

Is your feature request related to a problem? Please describe.
When running draft create on the following repo, draft prompts for gradle or maven https://github.com/codecov/example-java-gradle

[Draft] --- Detecting Language ---
Use the arrow keys to navigate: ↓ ↑ → ←
? Linguist detected Java, are you using maven or gradle?:
  > gradle
    maven

Mention what platform you want to support the new feature
OSS

Describe the solution you'd like
Draft should detect the *.gradle files in a repository to determine if gradle is used.

Describe alternatives you've considered
A better method for detecting gradle or maven could be used. The build files are the best way I could determine.

Additional context
(none)

@hsubramanianaks
Copy link
Contributor

@msftph Thanks for raising this request. Are you requesting for draft to detect the languages looking at the files like *.gradle or pom.xml and auto assume without asking the user for confirmation? for ex: ````are you using maven or Gradle ? ``` part. If that's the case, we can actually do it, but I need to consult with my team if that's okay.

if file contains pom.xml then
 language = maven 
else if file contains *.gradle then
   if a folder contains gradle/wrapper and it is not empty then 
      language = gradlew
   else 
      language = gradle
else 
  "ask the user to select" ?

@msftph
Copy link
Author

msftph commented Aug 11, 2023

Yes. #223 and this issue are similar requests. The idea to default the selection would be the best approach if you can't suppress the message.

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

No branches or pull requests

2 participants