issues

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 1 Imported by: 0

README

Generating the list of open issues

  1. To use the script, generate access token here: https://github.com/settings/tokens?type=beta.
  2. To get all open issues invoke the first script setting SF_TF_SCRIPT_GH_ACCESS_TOKEN:
  cd gh && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .
  1. File issues.json should be generated in the gh directory. This is the input file for the second script.
  2. To get process the issues invoke the second script:
  cd file && go run .
  1. File issues.csv should be generated in the file directory. This is the CSV which summarizes all the issues we have.

Closing old issues (regarding https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/2755)

  1. To use the script, generate access token here: https://github.com/settings/tokens?type=beta.
  2. First get all open issues by invoking:
  cd gh && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .
  1. File issues.json should be generated in the gh directory. This is the input file for the second script. The next script is based also on presnowflake_bucket.csv that was created based on the GH issues filtering.
  2. To filter only closeable issues invoke this script:
  cd filter-closeable-old-issues && go run .
  1. Script will output files issues_to_close.csv and issues_edited.csv. There are two files documenting closing action on 30.04.2024 (20240430 - issues_edited.csv and 20240430 - issues_to_close.csv). In 20240430 - notes.MD there are notes regarding the questionable issues and the decisions taken.
  2. To close the issues with the appropriate comment provide issues_to_close.csv in close-with-comment dir. Example 20240430 - issues_to_close.csv is given. The run:
  cd close-with-comment && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .

Creating new labels and assigning them to issues

  1. Firstly, make sure all the needed labels exist in the repository, by running:
  cd create-labels && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .
  1. Then, we have to get data about the existing issues with:
  cd gh && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .
  1. Afterward, we need to process issues.json with:
  cd file && go run .
  1. Next you have to analyze generated CSV and assign categories in the Category column and resource / data source in the Object column (the GitHub issues buckets Excel should be used here named as GitHubIssuesBucket.csv; Update already existing one). The csv document be of a certain format with the following columns (with headers): "A" column with issue ID (in the format of "#<issue_id>"), "B" column with the category that should be assigned to the issue (should be one of the supported categories: "OTHER", "RESOURCE", "DATA_SOURCE", "IMPORT", "SDK", "IDENTIFIERS", "PROVIDER_CONFIG", "GRANTS", and "DOCUMENTATION"), and the "C" column with the object type (should be in the format of the terraform resource, e.g. "snowflake_database"). Then, you'll be able to use this csv (put it next to the main.go) to assign labels to the correct issues.
  cd assign-labels && SF_TF_SCRIPT_GH_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN> go run .

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepositoryLabels = []string{}/* 103 elements not displayed */

Functions

This section is empty.

Types

type Issue

type Issue struct {
	HtmlUrl     string       `json:"html_url"`
	Number      int          `json:"number"`
	Title       string       `json:"title"`
	Labels      []Label      `json:"labels"`
	State       string       `json:"state"`
	Comments    int          `json:"comments"`
	CreatedAt   time.Time    `json:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	Body        string       `json:"body"`
	Reactions   Reactions    `json:"reactions"`
	PullRequest *PullRequest `json:"pull_request"`
}

type Label

type Label struct {
	Url  string `json:"url"`
	Name string `json:"name"`
}

type PullRequest

type PullRequest struct {
	HtmlUrl string `json:"html_url"`
}

type Reactions

type Reactions struct {
	TotalCount int `json:"total_count"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL