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/18 14:47:47 UTC
[GitHub] [incubator-devlake] abeizn opened a new pull request, #2530: fix: jira verify enckey and jira encode password
abeizn opened a new pull request, #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530
# Summary
jira verify enckey and jira encode password
### Does this close any open issues?
fix: #2529
### Screenshots
Include any relevant screenshots here.
### Other Information
Any other information that is important to this PR.
--
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
[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
warren830 commented on code in PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530#discussion_r924120469
##########
plugins/jira/models/migrationscripts/updataSchemas20220505.go:
##########
@@ -0,0 +1,65 @@
+/*
Review Comment:
please use `pre_init_schemas` as file name. It's weird to see `updateSchemas` before `init_schemas`
--
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
[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
warren830 commented on code in PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530#discussion_r924120469
##########
plugins/jira/models/migrationscripts/updataSchemas20220505.go:
##########
@@ -0,0 +1,65 @@
+/*
Review Comment:
please use update
--
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
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530#discussion_r923526401
##########
plugins/jira/models/migrationscripts/init_schema.go:
##########
@@ -131,6 +138,9 @@ func (*InitSchemas) Up(ctx context.Context, db *gorm.DB) error {
c := config.GetConfig()
encKey := c.GetString("ENCODE_KEY")
+ if encKey == "" {
+ return fmt.Errorf("jia v0.10 invalid encKey")
Review Comment:
typo
--
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
[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530#discussion_r924136571
##########
plugins/jira/models/migrationscripts/updataSchemas20220505.go:
##########
@@ -0,0 +1,65 @@
+/*
Review Comment:
updated
##########
plugins/jira/models/migrationscripts/updataSchemas20220505.go:
##########
@@ -0,0 +1,65 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+ "context"
+
+ "github.com/apache/incubator-devlake/models/common"
+ "github.com/apache/incubator-devlake/plugins/jira/models/migrationscripts/archived"
+ "gorm.io/gorm"
+)
+
+type JiraConnection20220505 struct {
+ common.Model
+ Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"`
+ Endpoint string `json:"endpoint" validate:"required"`
+ BasicAuthEncoded string `json:"basicAuthEncoded" validate:"required"`
+ EpicKeyField string `gorm:"type:varchar(50);" json:"epicKeyField"`
+ 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"`
+}
+
+func (JiraConnection20220505) TableName() string {
+ return "_tool_jira_connections"
+}
+
+type UpdateSchemas20220505 struct{}
+
+func (*UpdateSchemas20220505) Up(ctx context.Context, db *gorm.DB) error {
+ m := db.Migrator()
+ if m.HasTable(&archived.JiraSource{}) && !m.HasTable(&archived.JiraConnection{}) {
+ err := db.Migrator().RenameTable(archived.JiraSource{}, JiraConnection20220505{})
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (*UpdateSchemas20220505) Version() uint64 {
+ return 20220505212344
+}
+
+func (*UpdateSchemas20220505) Owner() string {
+ return "Jira"
+}
+
+func (*UpdateSchemas20220505) Name() string {
+ return "Rename source to connection "
Review Comment:
updated
--
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
[GitHub] [incubator-devlake] warren830 merged pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
warren830 merged PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530
--
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
[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #2530: fix: jira verify enckey and jira encode password
Posted by GitBox <gi...@apache.org>.
warren830 commented on code in PR #2530:
URL: https://github.com/apache/incubator-devlake/pull/2530#discussion_r924135020
##########
plugins/jira/models/migrationscripts/updataSchemas20220505.go:
##########
@@ -0,0 +1,65 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+ "context"
+
+ "github.com/apache/incubator-devlake/models/common"
+ "github.com/apache/incubator-devlake/plugins/jira/models/migrationscripts/archived"
+ "gorm.io/gorm"
+)
+
+type JiraConnection20220505 struct {
+ common.Model
+ Name string `gorm:"type:varchar(100);uniqueIndex" json:"name" validate:"required"`
+ Endpoint string `json:"endpoint" validate:"required"`
+ BasicAuthEncoded string `json:"basicAuthEncoded" validate:"required"`
+ EpicKeyField string `gorm:"type:varchar(50);" json:"epicKeyField"`
+ 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"`
+}
+
+func (JiraConnection20220505) TableName() string {
+ return "_tool_jira_connections"
+}
+
+type UpdateSchemas20220505 struct{}
+
+func (*UpdateSchemas20220505) Up(ctx context.Context, db *gorm.DB) error {
+ m := db.Migrator()
+ if m.HasTable(&archived.JiraSource{}) && !m.HasTable(&archived.JiraConnection{}) {
+ err := db.Migrator().RenameTable(archived.JiraSource{}, JiraConnection20220505{})
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (*UpdateSchemas20220505) Version() uint64 {
+ return 20220505212344
+}
+
+func (*UpdateSchemas20220505) Owner() string {
+ return "Jira"
+}
+
+func (*UpdateSchemas20220505) Name() string {
+ return "Rename source to connection "
Review Comment:
how about changing to preparation for init_schemas
--
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