gengitkan/client/src/store/actions/issues.ts

31 lines
1.2 KiB
TypeScript
Raw Normal View History

2019-12-01 22:12:13 +01:00
export const FETCH_ISSUES_REQUEST = "FETCH_ISSUES_REQUEST";
export const FETCH_ISSUES_SUCCESS = "FETCH_ISSUES_SUCCESS";
export const FETCH_ISSUES_FAILURE = "FETCH_ISSUES_FAILURE";
2020-04-30 13:02:56 +02:00
export function fetchIssues(project: any) {
2019-12-01 22:12:13 +01:00
return { type: FETCH_ISSUES_REQUEST, project };
};
export const ADD_LABEL_REQUEST = "ADD_LABEL_REQUEST";
export const ADD_LABEL_SUCCESS = "ADD_LABEL_SUCCESS";
export const ADD_LABEL_FAILURE = "ADD_LABEL_FAILURE";
2020-04-30 13:02:56 +02:00
export function addLabel(project: any, issueNumber: any, label: string) {
2019-12-01 22:12:13 +01:00
return { type: ADD_LABEL_REQUEST, project, issueNumber, label };
}
export const REMOVE_LABEL_REQUEST = "REMOVE_LABEL_REQUEST";
export const REMOVE_LABEL_SUCCESS = "REMOVE_LABEL_SUCCESS";
export const REMOVE_LABEL_FAILURE = "REMOVE_LABEL_FAILURE";
2020-04-30 13:02:56 +02:00
export function removeLabel(project: any, issueNumber: any, label: string) {
2019-12-01 22:12:13 +01:00
return { type: REMOVE_LABEL_REQUEST, project, issueNumber, label };
2019-12-05 22:37:09 +01:00
}
export const CREATE_ISSUE_REQUEST = "CREATE_ISSUE_REQUEST";
export const CREATE_ISSUE_SUCCESS = "CREATE_ISSUE_SUCCESS";
export const CREATE_ISSUE_FAILURE = "CREATE_ISSUE_FAILURE";
2020-04-30 13:02:56 +02:00
export function createIssue(project: any, title: string, body: any, label: string) {
2019-12-05 22:37:09 +01:00
return { type: CREATE_ISSUE_REQUEST, project, title, body, label };
};