feat(core): align GitHub metadata handling with other backends (#3316)
* Revert "Revert "feat(core): Align GitHub metadata handling with other backends (#3292)"" This reverts commit 5bdd3df9ccbb5149c22d79987ebdcd6cab4b261f. * fix(backend-github): fix migration code * test(backend-github): fix test * test(e2e): shorten wait time * test(e2e): try and fix test on CI
This commit is contained in:
@ -13,7 +13,13 @@
|
||||
require('dotenv').config();
|
||||
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin');
|
||||
|
||||
const { setupGitHub, teardownGitHub, setupGitHubTest, teardownGitHubTest } = require('./github');
|
||||
const {
|
||||
setupGitHub,
|
||||
teardownGitHub,
|
||||
setupGitHubTest,
|
||||
teardownGitHubTest,
|
||||
seedGitHubRepo,
|
||||
} = require('./github');
|
||||
const {
|
||||
setupGitGateway,
|
||||
teardownGitGateway,
|
||||
@ -29,7 +35,7 @@ const {
|
||||
} = require('./bitbucket');
|
||||
const { setupProxy, teardownProxy, setupProxyTest, teardownProxyTest } = require('./proxy');
|
||||
|
||||
const { copyBackendFiles } = require('../utils/config');
|
||||
const { copyBackendFiles, switchVersion } = require('../utils/config');
|
||||
|
||||
module.exports = async (on, config) => {
|
||||
// `on` is used to hook into various events Cypress emits
|
||||
@ -133,6 +139,28 @@ module.exports = async (on, config) => {
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
async seedRepo(taskData) {
|
||||
const { backend } = taskData;
|
||||
|
||||
console.log(`Seeding repository for backend`, backend);
|
||||
|
||||
switch (backend) {
|
||||
case 'github':
|
||||
await seedGitHubRepo(taskData);
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
async switchToVersion(taskData) {
|
||||
const { version } = taskData;
|
||||
|
||||
console.log(`Switching CMS to version '${version}'`);
|
||||
|
||||
await switchVersion(version);
|
||||
|
||||
return null;
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user