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

Add owner attribute for reading public repos #1943

Closed
wants to merge 2 commits into from

Conversation

Nmishin
Copy link
Contributor

@Nmishin Nmishin commented Oct 7, 2023

Resolves #1938

The main idea here that we need to calculate owner parameter no matter this is anonymous user or user with token.

Before the change?

  • No owner added if no token specified. Neither via GITHUB_OWNER env variable, neither via specifying owner in the provider configuration.
  • Because of this path to repos calculated wrongly, for example like: /repos//some_public_repository/git/ref/heads/main

After the change?

  • Owner can be added if no token used. Works via GITHUB_OWNER env variable and also in the provider configuration.
  • All configuration precedence works as described in provider configuration docks.

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)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@nickfloyd nickfloyd added Type: Feature New feature or request hacktoberfest Issues for participation in Hacktoberfest labels Oct 10, 2023
@kfcampbell
Copy link
Member

@Nmishin have you looked at #1029? What do you think about that approach vs. yours?

@Nmishin
Copy link
Contributor Author

Nmishin commented Oct 26, 2023

@kfcampbell I didn't saw it, honestly :)
My idea was exactly the same, I think we need to merge your MR

@kfcampbell
Copy link
Member

@Nmishin I've done so now and will release it with the next version of the provider. Thank you for your help and contributions!

@Nmishin Nmishin closed this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Type: Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: github_branch data source constructs incorrect API URL for public repo
3 participants