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

chore: Add short scripts used to fetch all currently opened issues #2288

Merged
merged 6 commits into from
Dec 21, 2023

Conversation

sfc-gh-asawicki
Copy link
Collaborator

Add short scripts used to fetch all currently opened issues (for future reference).

Copy link

Integration tests failure for c1963ad0884853a5ff0130198c40513db5406138

Copy link

Integration tests failure for 0260982561a6b102c8766e6c16584d3a059ddd3c

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review December 20, 2023 14:44
```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.
Copy link
Collaborator

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.

Copy link
Collaborator Author

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"
Copy link
Collaborator

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.

Copy link
Collaborator Author

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")
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, only from GH

@sfc-gh-asawicki sfc-gh-asawicki merged commit 0b5ce4e into main Dec 21, 2023
7 of 8 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the categorize-issues branch December 21, 2023 09:34
sfc-gh-asawicki pushed a commit that referenced this pull request Dec 21, 2023
🤖 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>
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.

3 participants