Skip to content

Commit

Permalink
Merge pull request #123 from AnonymusRaccoon/github_login
Browse files Browse the repository at this point in the history
GitHub login
  • Loading branch information
zoriya authored Mar 6, 2022
2 parents b28343f + 52ede41 commit a0228bd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 275 deletions.
64 changes: 5 additions & 59 deletions api/services/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,60 +64,6 @@
}
]
},
{
"name": "Github_CommentPR",
"description": {
"en": "Comments the numbered pull request of the given repository",
"fr": "Commente la pull request numérotée dans le répertoire donné"
},
"label": {
"en": "Comments a pull request",
"fr": "Commente une pull request"
},
"params": [
{
"name": "owner",
"type": "string",
"description": {
"en": "The user's username that owns the repository",
"fr": "Pseudo de l'utilisateur qui possède le répertoire"
}
},
{
"name": "repo",
"type": "string",
"description": {
"en": "The targeted repository's name",
"fr": "Nom du répertoire ciblé"
}
},
{
"name": "pull_number",
"type": "integer",
"description": {
"en": "The number assigned to the commented pull request",
"fr": "Numéro assignée à la pull request commentée"
}
},
{
"name": "body",
"type": "string",
"description": {
"en": "The body of the comment written under the pull request",
"fr": "Corps du commentaire écrit sous la pull request"
}
}
],
"returns": [
{
"name": "URL",
"description": {
"en": "The url to the comment",
"fr": "URL vers le commentaire"
}
}
]
},
{
"name": "Github_ClosePR",
"description": {
Expand Down Expand Up @@ -255,8 +201,8 @@
"fr": "Commente une issue donnée dans un répertoire donné"
},
"label": {
"en": "Comments an issue",
"fr": "Commente une issue"
"en": "Comments an issue or pull request",
"fr": "Commente une issue ou une pull request"
},
"params": [
{
Expand All @@ -279,16 +225,16 @@
"name": "issue_number",
"type": "integer",
"description": {
"en": "The number assigned to the issue to comment",
"fr": "Numéro assigné à l'issue à commenter"
"en": "The number assigned to the issue or pull request to comment",
"fr": "Numéro assigné à l'issue ou de la pull request à commenter"
}
},
{
"name": "body",
"type": "string",
"description": {
"en": "The body of the comment",
"fr": "Corps du commentaire écrit sous l'issue"
"fr": "Contenu du commentaire"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion web-app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Aeris professional personnal action-reaction manager"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
Expand Down
7 changes: 3 additions & 4 deletions web-app/src/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ export const deSerializeApiPipelineAction = (data: any, actions: Array<AppAREATy
};
};

export const deSerializeApiPipelineReaction = (data: any, reactions: Array<AppAREAType>): AppAREAType => {
const refReaction = deepCopy(reactions.filter((el) => el.type === data.rType)[0]);

export const deSerializeApiPipelineReaction = (data: any, refReaction: AppAREAType): AppAREAType => {
let params: { [key: string]: ParamsType } = refReaction.params;
Object.entries(data.rParams as { [key: string]: string }).forEach((paramData) => {
if (!(paramData[0] in params)) return;
Expand All @@ -166,7 +164,8 @@ export const deSerializeApiPipelineReaction = (data: any, reactions: Array<AppAR
export const deSerializePipeline = (data: any, AREAs: Array<Array<AppAREAType>>): AppPipelineType => {
let reactionList: AppAREAType[] = [];
for (const reaction of data.reactions) {
reactionList.push(deepCopy(deSerializeApiPipelineReaction(reaction, AREAs[1])));
const refReaction = deepCopy(AREAs[1].filter((el) => el.type === reaction.rType)[0]);
if (refReaction !== undefined) reactionList.push(deepCopy(deSerializeApiPipelineReaction(reaction, refReaction)));
}

return {
Expand Down
13 changes: 0 additions & 13 deletions worker/src/models/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,14 @@ export enum ServiceType {
Utils,
};


export enum PipelineType {
// Special value that will never emit an action. It is used for deleted pipelines.
Never,
OnTweet,

OnYtUpload,
OnYtLike,
OnYtPlaylistAdd,

OnOpenPR,
OnCommentPR,
OnClosePR,
OnMergePR,
OnCreateIssue,
OnCommentIssue,
OnCloseIssue,
OnForkRepo,
OnStarRepo,
OnWatchRepo,
OnSpotifyAddToPlaylist,
OnSpotifySaveToLibrary,

Expand All @@ -42,7 +30,6 @@ export enum ReactionType {
YtAddToPlaylist,
// Github reactions
OpenPR,
CommentPR,
ClosePR,
MergePR,
CreateIssue,
Expand Down
Loading

0 comments on commit a0228bd

Please sign in to comment.