-
Notifications
You must be signed in to change notification settings - Fork 420
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
chore: Add short scripts used to fetch all currently opened issues #2288
Conversation
Integration tests failure for c1963ad0884853a5ff0130198c40513db5406138 |
Integration tests failure for 0260982561a6b102c8766e6c16584d3a059ddd3c |
```shell | ||
cd gh && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run . | ||
``` | ||
3. File `issues.json` should be generated in the `gh` directory. This is the input file for the second script. |
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.
why can't steps 2/3/4 be combined into one step? Getting and processing at same time.
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.
The reason was that the data does not change between runs: The result of the first script is always the same. So this way, I was able to experiment on the static data that was faster and without locking my GH account because of the API limits they have.
versionRegex := regexp.MustCompile(`v?\.?(\d+\.(\d+)(.\d+)?)`) | ||
vMatches := versionRegex.FindStringSubmatch(matches[1]) | ||
if len(vMatches) == 0 { | ||
return "NONE" |
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.
instead of returning None, we could return the version of Terraform that was current at the time the issue was created.
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.
Yes, I was thinking about that: to keep a static list of releases with dates or to fetch them through API also. But this way we would get the latest possible version, which is not necessarily true. Also the regexps for extracting the version are not perfect. I guess this is the addition not needed now, because I already have a version for each issue.
} | ||
|
||
func loadIssues() []i.Issue { | ||
bytes, err := os.ReadFile("../gh/issues.json") |
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.
is this meant to load issues coming from multiple sources? if so, it seems to be strongly dependent on the github issue interface
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.
Nope, only from GH
🤖 I have created a release *beep* *boop* --- ## [0.82.0](v0.81.0...v0.82.0) (2023-12-21) ### 🎉 **What's new:** * add functions to sdk ([#2205](#2205)) ([e542b67](e542b67)) ### 🔧 **Misc** * Add short scripts used to fetch all currently opened issues ([#2288](#2288)) ([0b5ce4e](0b5ce4e)) * Bump dependencies and fix linter complaints ([#2300](#2300)) ([124e862](124e862)) ### 🐛 **Bug fixes:** * Fix resource monitor alter validations in the SDK ([#2298](#2298)) ([74d19d0](74d19d0)) * Fix email notification integration ([#2292](#2292)) ([70edd3e](70edd3e)) * Fix for #2283 ([#2284](#2284)) ([bbad5c6](bbad5c6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
Add short scripts used to fetch all currently opened issues (for future reference).