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

docs: fix erroneous github_repository_file docs #1540

Conversation

GilUpstream
Copy link
Contributor

@GilUpstream GilUpstream commented Feb 9, 2023

  • Updates the docs with the correct default set for the branch argument

Resolves #1539


Behavior

Before the change?

  • Docs lead provider consumers to believe the default branch will be using when using the data source without a branch argument.

After the change?

  • Consumers of this provider will know that main will be used as the branch if it is not supplied.

Other information

  • Removed the note about the branch already existing as well since that is relevant to the resource for github_repository_file only.

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

GilUpstream and others added 2 commits February 9, 2023 13:27
@nickfloyd
Copy link
Contributor

@GilUpstream Thanks for the update for clarity here. This does make me wonder if this particular aspect of the provider is working as it should - i.e. It should use the default branch and not just main (which could be different from the default).

@kfcampbell Do you have any thoughts or feels on this specific behavior?

@kfcampbell
Copy link
Member

Agreed that we should look up the default branch; I've created #1546 to track that work. In the meantime, this PR is an improvement in that the docs will match the behavior.

@kfcampbell kfcampbell merged commit ab4070a into integrations:main Feb 13, 2023
@GilUpstream
Copy link
Contributor Author

@GilUpstream Thanks for the update for clarity here. This does make me wonder if this particular aspect of the provider is working as it should - i.e. It should use the default branch and not just main (which could be different from the default).

@kfcampbell Do you have any thoughts or feels on this specific behavior?

Agreed! I'm currently using the github_repository data source to look up the repo's default branch. My configs would be much simpler if the default branch was used.

reedloden pushed a commit to reedloden/terraform-provider-github that referenced this pull request Jun 14, 2023
- Updates the docs with the correct default set for the branch argument

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
- Updates the docs with the correct default set for the branch argument

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
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.

[DOCS]: github_repository_file data source branch argument docs are incorrect
3 participants