-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
151 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
## Github's Teams and Gitlab's Groups differences | ||
|
||
Github's Teams are groups of organization members whereas Gitlab's Groups are just groups of Gitlab users (Groups are more like Github' organizations). | ||
Each Github organization can have repositories and assign teams to them and each team can have subteams. | ||
Gitlab groups can have repositories and create subgroups (nested). | ||
|
||
## Setup guide | ||
|
||
### Github | ||
|
||
1. Go to 'https://github.com/settings/organizations' and click 'New organization' button | ||
2. Select your plan. | ||
3. Enter organization's name, contact email address, solve the captcha and click Next | ||
4. Click 'Skip this step' | ||
5. If you receive a survey, you can just go to the bottom and click Submit without filling anything. | ||
6. On your new organization page go to 'Teams' tab and click 'New team' button. | ||
7. Fill in your team's name, description (optional) and visibility. Submit by clicking 'Create team'. | ||
Now you have your team created and you should get redirect to its page. | ||
You can assign it to an organization's repository by clicking 'Add Repository' and entering repository's name, in 'Repositories' tab of a team's page. | ||
|
||
### Gitlab | ||
|
||
1. Go to 'https://gitlab.com/dashboard/groups' and click on 'New group' button. | ||
2. Enter group's name and set visibility level. Finish by clicking 'Create group'. | ||
You can now create repositories for this group or subgroups. | ||
|
||
## Roles | ||
|
||
In Topcoder X you can select role which user who joins via specific invitation link receives. | ||
|
||
### Github | ||
|
||
For github team you can set two roles: Member and Maintainer. | ||
You can read about them here: https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/permission-levels-for-an-organization and https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/giving-team-maintainer-permissions-to-an-organization-member | ||
|
||
### Gitlab | ||
|
||
For gitlab group you can set five roles: Guest, Reporter, Developer, Maintainer, Owner | ||
You can read about them here: https://docs.gitlab.com/ee/user/permissions.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const logger = require('../src/common/logger') | ||
const models = require('../src/models') | ||
const _ = require('lodash') | ||
|
||
async function main() { | ||
const BATCH_SIZE = process.env.BATCH_SIZE || 15; | ||
let previousSize = BATCH_SIZE; | ||
let previousKey = null; | ||
// Array containing project ids already found colliding | ||
const collidingUrls = [] | ||
let batch = 1; | ||
// Run this loop as long as there can be more objects in a database | ||
while (previousSize === BATCH_SIZE) { | ||
logger.debug(`Running batch no. ${batch}`) | ||
// Go over all active projects, limiting to BATCH_SIZE | ||
const projects = await models.Project.scan({ | ||
archived: 'false' | ||
}).consistent().limit(BATCH_SIZE).startAt(previousKey).exec() | ||
for (const project of projects) { | ||
// If url was already found colliding go to a next iteration | ||
if (collidingUrls.includes(project.repoUrl)) continue; | ||
const collisions = await models.Project.scan({ | ||
repoUrl: project.repoUrl, | ||
archived: 'false' | ||
}).exec() | ||
// If scan found only this project go to a next interation | ||
if (collisions.length < 2) continue; | ||
logger.info(`Repository ${project.repoUrl} has ${collisions.length} collisions`); | ||
_.forEach(collisions, collision => { | ||
logger.info(`--- ID: ${collision.id}`) | ||
}) | ||
collidingUrls.push(project.repoUrl) | ||
} | ||
previousKey = projects.lastKey | ||
previousSize = projects.scannedCount | ||
batch++ | ||
} | ||
} | ||
main().then(() => { | ||
logger.info('Collision scan completed') | ||
}).catch(err => { | ||
logger.logFullError(err, 'collision scan') | ||
}) |
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
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