mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 06:22:53 +00:00
refactor: extrac slack channel ID into configuration
This commit is contained in:
@@ -14,41 +14,59 @@
|
|||||||
*/
|
*/
|
||||||
import {Label} from '@openstapps/gitlab-api/lib/types';
|
import {Label} from '@openstapps/gitlab-api/lib/types';
|
||||||
|
|
||||||
// list of school with their IDs
|
/**
|
||||||
|
* List of schools with their IDs
|
||||||
|
*/
|
||||||
export const SCHOOLS: { [school: string]: number } = {};
|
export const SCHOOLS: { [school: string]: number } = {};
|
||||||
|
|
||||||
// list of group IDs to fetch issues for - 4088298 is openstapps main group
|
/**
|
||||||
|
* List of group IDs to fetch issues for
|
||||||
|
*
|
||||||
|
* 4088298 is openstapps main group
|
||||||
|
*/
|
||||||
export const GROUPS: number[] = [4088298].concat(Object.keys(SCHOOLS).map((school) => {
|
export const GROUPS: number[] = [4088298].concat(Object.keys(SCHOOLS).map((school) => {
|
||||||
return SCHOOLS[school];
|
return SCHOOLS[school];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// weight for labels to order issues by
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
export const LABEL_WEIGHTS: any = {
|
export const LABEL_WEIGHTS: any = {
|
||||||
'bug': 1,
|
'bug': 1,
|
||||||
'critical': 2,
|
'critical': 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// list of labels to print bold
|
/**
|
||||||
|
* List of labels to print bold in report
|
||||||
|
*/
|
||||||
export const BOLD_LABELS: string[] = [
|
export const BOLD_LABELS: string[] = [
|
||||||
'bug',
|
'bug',
|
||||||
'critical',
|
'critical',
|
||||||
];
|
];
|
||||||
|
|
||||||
// GitLab API URL
|
/**
|
||||||
|
* GitLab API URL
|
||||||
|
*/
|
||||||
export const GITLAB_API_URL = 'https://gitlab.com/api/v4/';
|
export const GITLAB_API_URL = 'https://gitlab.com/api/v4/';
|
||||||
|
|
||||||
// needed milestones
|
/**
|
||||||
|
* Milestones to add to projects
|
||||||
|
*/
|
||||||
export const NEEDED_MILESTONES = [
|
export const NEEDED_MILESTONES = [
|
||||||
'Backlog',
|
'Backlog',
|
||||||
];
|
];
|
||||||
|
|
||||||
// branches to protect
|
/**
|
||||||
|
* Protected branches
|
||||||
|
*/
|
||||||
export const PROTECTED_BRANCHES = [
|
export const PROTECTED_BRANCHES = [
|
||||||
'develop',
|
'develop',
|
||||||
'master',
|
'master',
|
||||||
];
|
];
|
||||||
|
|
||||||
// needed labels
|
/**
|
||||||
|
* Labels to add to all projects
|
||||||
|
*/
|
||||||
export const NEEDED_LABELS: Label[] = [
|
export const NEEDED_LABELS: Label[] = [
|
||||||
{
|
{
|
||||||
color: '#FF0000',
|
color: '#FF0000',
|
||||||
@@ -141,7 +159,7 @@ export const NEEDED_LABELS: Label[] = [
|
|||||||
return {
|
return {
|
||||||
color: '#F0AD4E',
|
color: '#F0AD4E',
|
||||||
description: 'An issue that specifically applies to this school',
|
description: 'An issue that specifically applies to this school',
|
||||||
name: 'school-' + school,
|
name: `school-${school}`,
|
||||||
};
|
};
|
||||||
})).concat(['android', 'iOS', 'web', 'node'].map((platform) => {
|
})).concat(['android', 'iOS', 'web', 'node'].map((platform) => {
|
||||||
return {
|
return {
|
||||||
@@ -151,4 +169,12 @@ export const NEEDED_LABELS: Label[] = [
|
|||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prefix for automatically created notes
|
||||||
|
*/
|
||||||
export const NOTE_PREFIX = '`openstapps/projectmanagement`';
|
export const NOTE_PREFIX = '`openstapps/projectmanagement`';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Slack channel to post messages to
|
||||||
|
*/
|
||||||
|
export const SLACK_CHANNEL = 'C762UG76Z';
|
||||||
|
|||||||
Reference in New Issue
Block a user