-
Notifications
You must be signed in to change notification settings - Fork 763
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 a data source for refs. #1084
Conversation
78f25e3
to
c2b74ff
Compare
@kfcampbell this one's probably simpler to land then #1066, which I haven't had as much time to work on. Any chance you could kick the workflows for this as well? Thanks so much! |
@youcandanch Done! Do you also mind linking to the sweet new docs page you just created in the .erb file? Thanks! |
c2b74ff
to
1209d3e
Compare
1209d3e
to
49fedbd
Compare
@kfcampbell all set! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! I'll shoot to get this released at the end of this week.
@kfcampbell looks like an older commit of mine made it up here, which means there's some errors in the ref code. I'm gonna fix it, but I'm also gonna glance and see why tests were able to pass, as I don't think there's a way they should be passing right now. Issue opened here: #1108 |
Co-authored-by: Keegan Campbell <[email protected]>
Co-authored-by: Keegan Campbell <[email protected]>
Description
We're currently lacking a way to retrieve some basic information on a given ref within the Terraform provider. A crisp use case for this might be "I have a release that's based off of a tag, and I'd like to be able to retrieve the SHA1 for the HEAD commit in order to use elsewhere." This PR introduces a
github_ref
data source, which pretty shamelessly steals from the existinggithub_branch
data source. I considered lifting out some of the code into a shared function, but the API calls are lightweight enough where I don't think there's that much harm from a few lines of duplication.Tests are currently passing and documentation has been added to the markdown.