Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Version 1.2 #75

Merged
merged 5 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions models/Issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const schema = new Schema({
name: 'RepositoryIdIndex'
}
},
repoUrl: {
type: String
},
repositoryIdStr: {type: String, required: false},
labels: {
type: Array,
Expand Down
12 changes: 0 additions & 12 deletions models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,12 @@ const schema = new Schema({
type: Number,
required: true
},
repoUrl: {
type: String,
required: true,
index: {
global: true,
rangeKey: 'archived',
project: true,
name: 'RepoUrlIndex'
}
},
repoId: {type: String, required: false},
rocketChatWebhook: {type: String, required: false},
rocketChatChannelName: {type: String, required: false},
archived: {type: String, required: true},
owner: {type: String, required: true},
secretWebhookKey: {type: String, required: true},
copilot: {type: String, required: false},
registeredWebhookId: {type: String, required: false},
updatedAt: {
type: Date,
default: Date.now
Expand Down
45 changes: 45 additions & 0 deletions models/Repository.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2018 TopCoder, Inc. All rights reserved.
*/
'use strict';

/**
* Schema for project and repository mapping.
* @author TCSCODER
* @version 1.0
*/
const dynamoose = require('dynamoose');

const Schema = dynamoose.Schema;

const schema = new Schema({
id: {
type: String,
hashKey: true,
required: true
},
projectId: {
type: String,
required: true,
index: {
global: true,
project: true,
name: 'ProjectIdIndex'
}
},
url: {
type: String,
required: true,
index: {
global: true,
project: true,
rangKey: 'archived',
name: 'URLIndex'
}
},
archived: {type: String, required: true},
repoId: {type: String, required: false},
registeredWebhookId: {type: String, required: false}
});

module.exports = schema;
3 changes: 2 additions & 1 deletion models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const models = {
User: dynamoose.model('Topcoder_X.User', require('./User')),
CopilotPayment: dynamoose.model('Topcoder_X.CopilotPayment', require('./CopilotPayment')),
GithubUserMapping: dynamoose.model('Topcoder_X.GithubUserMapping', require('./GithubUserMapping')),
GitlabUserMapping: dynamoose.model('Topcoder_X.GitlabUserMapping', require('./GitlabUserMapping'))
GitlabUserMapping: dynamoose.model('Topcoder_X.GitlabUserMapping', require('./GitlabUserMapping')),
Repository: dynamoose.model('Topcoder_X.Repository', require('./Repository'))
};
/* eslint-enable global-require */

Expand Down
Loading