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

added proposed default.gitignore #8

Closed
wants to merge 2 commits into from
Closed

Conversation

wz-gsa
Copy link
Contributor

@wz-gsa wz-gsa commented Feb 29, 2024

Changes proposed in this pull request:

  • added proposed default.gitignore for use across the organization.

Things to check

  • Are we missing any potential useful defaults?
  • Will this cause any breakages?

Security considerations

This should improve security by ensuring developer configs and other files do not accidentally make their way into github.

@wz-gsa wz-gsa requested a review from a team February 29, 2024 16:11
Copy link
Contributor

@bengerman13 bengerman13 left a comment

Choose a reason for hiding this comment

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

I have mixed feelings about this - having good defaults is awesome, but I don't know what overriding them looks like in this case.

If we go the route of having this as a default repo-local gitignore, then we can of course edit as necessary (but we don't get protection on non-cg repos)
If we suggest this as a global gitignore, then again, folks can edit as necessary, but it gets pretty weak as time and drift go on
If we enforce this as a global gitignore, it seems likely that some of these will be surprising, so there will probably be some painful adjustment and tuning time

Comment on lines +156 to +158
manifest.yml
manifest-*.yml
*.env
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these will cause problems, for example:
[we have a manifest.yml here])https://github.com/cloud-gov/cf-hello-worlds/blob/8a17d850b6cf13e679754da0adfc0b62c5245fcb/go-hello/manifest.yml#L4)

Including manifests is a somewhat-common pattern, and there are definitely ways to do it safely

Comment on lines +159 to +160
*.vars.yml
*.vars-*.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

these feel a little aggressive, especially with the globs. If my repo needs a ${env}.vars.yml, I'm likely to include an example.vars.yml or dev.vars.yml.example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think a dev.vars.yml.example would pass this, but you're right the other formats wouldn't. Having the examples format narrowly scoped/standardized is a good thing though imo. What do you think?

# Concourse specific
/fly-*
/concourse-*
/pipelines/
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure we use this pattern deliberately somewhere?

Copy link

Choose a reason for hiding this comment

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

Everything I've seen has been /ci

Plus this only impacts new repos so 🤷

.github/default.gitignore Show resolved Hide resolved
@wz-gsa wz-gsa closed this Sep 5, 2024
@wz-gsa wz-gsa deleted the add_default.gitignore branch September 5, 2024 16:52
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.

3 participants