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

Skip creation of ./.github/dependabot.yml by default #10095

Closed
ndlarsen opened this issue Jul 25, 2024 · 7 comments · Fixed by devcontainers/templates#278
Closed

Skip creation of ./.github/dependabot.yml by default #10095

ndlarsen opened this issue Jul 25, 2024 · 7 comments · Fixed by devcontainers/templates#278
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality on-testplan
Milestone

Comments

@ndlarsen
Copy link

Currently when creating a dev container, a ./.github/dependabot.yml is added. Looking through the extension's settings I have found no obvious way to prevent this. I suggest this is configurable and disabled by default.

@vs-code-engineering vs-code-engineering bot added the containers Issue in vscode-remote containers label Jul 25, 2024
@chrmarti
Copy link
Contributor

This is added by the templates. I wonder if we should have a setting to skip all files in .github.

@chrmarti chrmarti added the feature-request Request for new features or functionality label Jul 31, 2024
@chrmarti chrmarti added this to the Backlog milestone Jul 31, 2024
@chrmarti chrmarti added the under-discussion Issue is under discussion for relevance, priority, approach label Jul 31, 2024
@chrmarti
Copy link
Contributor

Or we could add it as an option in the UI when adding the configuration.

@ndlarsen
Copy link
Author

ndlarsen commented Jul 31, 2024

Thank you for acknowledging this.

This is added by the templates. I wonder if we should have a setting to skip all files in .github.

The need for ./.github is situational, so this is in my opinion worth considering.

Or we could add it as an option in the UI when adding the configuration.

Having this as an option in the drop down menu when creating a new dev container via the GUI could probably be nice in addition to

  • being able to disable it via the .devcontainer/devcontainer.json.
  • having a way to disable it when using a pre-existing dev container as base

@joshspicer
Copy link
Member

joshspicer commented Jul 31, 2024

I think it would be nice to generalize this behavior beyond .github. We could add an optionalPaths property (or similar) to the Template's devcontainer-template.json manifest file.

{
    "id": "cpp",
    "version": "3.0.0",
    "name": "C++",
    "description": "Develop C++ applications",
    "optionalPaths": [
         ".github/*"
     ]
}

With that information the Dev Containers extension could then prompt the user with whether or not they want to include those path(s) when applying the template.

I could see this useful not only for platform-specific files (like .github), but perhaps also for example/boilerplate code:

{
    "id": "cpp",
    "version": "3.0.0",
    "name": "C++",
    "description": "Develop C++ applications",
    "optionalPaths": [
         ".example-project/*",
         "MyProject.csproj",
         ...
     ]
}

We'd then update all our devcontainers/templates with .github being optional.

Thoughts?

Edit: Formal spec proposal for commenting devcontainers/spec#484

@joshspicer
Copy link
Member

Related to devcontainers/templates#274

@joshspicer
Copy link
Member

joshspicer commented Aug 13, 2024

Will keep this open until we publish a pre-release of the dev containers extension (set to release by the end of this milestone 😄 )

(Interested Template authors can get their Templates ready by following this example and associated spec link: devcontainers/templates#278)

@joshspicer
Copy link
Member

Support for Templates that declare optionalPaths has shipped in the Dev Containers extension pre-release v0.382.0.

I've re-published all the Templates in the devcontainers/templates repo to declare .github as optional.

Screen.Recording.2024-08-23.at.11.04.06.AM.mov

Please give the feature a try and let us know how it feels.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants