-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: bitbucket add merge by field * feat: bitbucket add merge by field Co-authored-by: abeizn <[email protected]>
- Loading branch information
1 parent
ff41749
commit 483c93e
Showing
6 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
backend/plugins/bitbucket/models/migrationscripts/20240717_add_merge_by_to_pr.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
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 ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*addMergedByToPr)(nil) | ||
|
||
type pr20240710 struct { | ||
MergedByName string `gorm:"type:varchar(100)"` | ||
MergedById string `gorm:"type:varchar(100)"` | ||
} | ||
|
||
func (pr20240710) TableName() string { | ||
return "_tool_bitbucket_pull_requests" | ||
} | ||
|
||
type addMergedByToPr struct{} | ||
|
||
func (*addMergedByToPr) Up(basicRes context.BasicRes) errors.Error { | ||
db := basicRes.GetDal() | ||
if err := db.AutoMigrate(&pr20240710{}); err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
func (*addMergedByToPr) Version() uint64 { | ||
return 20240717142100 | ||
} | ||
|
||
func (*addMergedByToPr) Name() string { | ||
return "add merged by to _tool_bitbucket_pull_requests" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters