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

Set commit info using create or update #466

Merged
merged 2 commits into from
Jun 9, 2020
Merged

Set commit info using create or update #466

merged 2 commits into from
Jun 9, 2020

Commits on May 18, 2020

  1. Set commit info using create or update

    Due to how the read func was written Terraform will try to find the
    commit info each time it does a refresh. As you cannot get this info
    easily from the GitHub API, the provider would loop through commits
    until it found one containing the file in question. When the commit is a
    a distant memory, it can incur many API requests and, when managing many
    files across many repositories, could result in being rate limited.
    
    To address this instead we now set this info when the file is created or
    updated and not during the refresh. This is pretty safe as for this info
    to change upstream it would mean changing the file contents, which would
    trigger Terraform to update the file again (to enforce desired state).
    
    Signed-off-by: Stephen Hoekstra <shoekstra@schubergphilis.com>
    shoekstra committed May 18, 2020
    Configuration menu
    Copy the full SHA
    cb473e4 View commit details
    Browse the repository at this point in the history
  2. Move getFileCommit to util.go

    Signed-off-by: Stephen Hoekstra <shoekstra@schubergphilis.com>
    shoekstra committed May 18, 2020
    Configuration menu
    Copy the full SHA
    a6bb9ad View commit details
    Browse the repository at this point in the history