You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/14 01:53:10 UTC
[GitHub] [incubator-devlake] klesh commented on a diff in pull request #2492: refactor: rename connection.RateLimit to connection.RateLimitPerHour
klesh commented on code in PR #2492:
URL: https://github.com/apache/incubator-devlake/pull/2492#discussion_r920639984
##########
plugins/feishu/models/migrationscripts/archived/connection.go:
##########
@@ -23,12 +23,12 @@ import (
type FeishuConnection struct {
commonArchived.Model
- Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"`
- Endpoint string `mapstructure:"endpoint" env:"GITHUB_ENDPOINT" validate:"required"`
- Proxy string `mapstructure:"proxy" env:"GITHUB_PROXY"`
- RateLimit int `comment:"api request rate limit per hour"`
- AppId string `mapstructure:"app_id" validate:"required" json:"app_id"`
- SecretKey string `mapstructure:"secret_key" validate:"required" json:"secret_key" encrypt:"yes"`
+ Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"`
+ Endpoint string `mapstructure:"endpoint" env:"GITHUB_ENDPOINT" validate:"required"`
+ Proxy string `mapstructure:"proxy" env:"GITHUB_PROXY"`
+ RateLimitPerHour int `comment:"api request rate limit per hour"`
Review Comment:
Change the version value of the migration script to a newer value is sufficient before next release
##########
plugins/jira/models/migrationscripts/archived/connection_history.go:
##########
@@ -30,7 +30,7 @@ type JiraConnectionV11 struct {
StoryPointField string `gorm:"type:varchar(50);" json:"storyPointField"`
RemotelinkCommitShaPattern string `gorm:"type:varchar(255);comment='golang regexp, the first group will be recognized as commit sha, ref https://github.com/google/re2/wiki/Syntax'" json:"remotelinkCommitShaPattern"`
Proxy string `json:"proxy"`
- RateLimit int `comment:"api request rate limt per hour" json:"rateLimit"`
+ RateLimitPerHour int `comment:"api request rate limt per hour" json:"rateLimit"`
Review Comment:
For Jira, please add a new migration script to rename the column, because unlink other plugins (connection is not supported before, thus no record in the database), Jira connection exists a long time ago, we need to keep those existing records in database intact. Here is an example FYI:
https://github.com/apache/incubator-devlake/blob/release-v0.11-hotfix/plugins/gitlab/models/migrationscripts/updateSchemas20220510.go
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org