Skip to content

allow .github and .gitlab directories in WalkFiles traversal#1833

Merged
dgageot merged 1 commit intodocker:mainfrom
maxcleme:co-allow-github-gitlab-dirs
Feb 25, 2026
Merged

allow .github and .gitlab directories in WalkFiles traversal#1833
dgageot merged 1 commit intodocker:mainfrom
maxcleme:co-allow-github-gitlab-dirs

Conversation

@maxcleme
Copy link
Member

@maxcleme maxcleme commented Feb 24, 2026

When working on CI it is super annoying to be not able to use @ with anything inside .github/ folder.

@maxcleme maxcleme force-pushed the co-allow-github-gitlab-dirs branch from 689ac99 to 4d5018b Compare February 24, 2026 10:30
@maxcleme maxcleme marked this pull request as ready for review February 24, 2026 12:52
@maxcleme maxcleme requested a review from a team as a code owner February 24, 2026 12:52
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Found one issue in the changed code: the modification to the hidden file/directory filtering logic now causes hidden files (not just directories) to be included in WalkFiles results when they should be skipped.

The original code would skip all hidden items (both files and directories) by returning from the condition early. The new code only applies the skip logic to directories, allowing hidden files like .gitignore, .env, .editorconfig, etc. to pass through and be collected at line 207.

Signed-off-by: maxcleme <maxime.clement@docker.com>
@maxcleme maxcleme force-pushed the co-allow-github-gitlab-dirs branch from 4d5018b to bd35fbe Compare February 24, 2026 13:08
@krissetto
Copy link
Contributor

maybe we should guard against .env as a precaution

@maxcleme
Copy link
Member Author

This .env isn't a dir, it will return nil, right? (and so not be processed?)

@aheritier
Copy link
Contributor

I don't think in claude code & friends they block it?
What they advice is to configure the permission to not read some files ( ex: https://code.claude.com/docs/en/settings#excluding-sensitive-files ) and they have a setting 'respectGitignore' to block by default the file-picker (personally I disable it)

Copy link
Contributor

@krissetto krissetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxcleme my bad, i only gave a very quick look at this earlier and made a bad assumption

@krissetto
Copy link
Contributor

@aheritier yeah true, and we did have similar things in place in cagent as well :)

@maxcleme
Copy link
Member Author

@krissetto Fwiw I do not have write permission here 😁

@dgageot dgageot merged commit 574ebb6 into docker:main Feb 25, 2026
5 checks passed
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.

4 participants