Fix infined load on Issues/Pulls if they dont exist #507

Merged
6543 merged 2 commits from fix-404-errors into master 2020-05-23 18:30:43 +00:00
Owner

If issues/pr are disabled, catch the correct response call and show proper layout.

close #53

If issues/pr are disabled, catch the correct response call and show proper layout. close #53
mmarif added this to the 3.0.0 milestone 2020-05-23 11:46:42 +00:00
mmarif added the
Improvement
label 2020-05-23 11:46:42 +00:00
mmarif self-assigned this 2020-05-23 11:46:42 +00:00
Member

can we use switch case for httpStatus checks in gennerel?

I'll pusch a commit

can we use switch case for httpStatus checks in gennerel? I'll pusch a commit
Member

@mmarif I would say the first batch got in ...

@mmarif I would say the first batch got in ...
Member

@mmarif @opyale I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks

https://try.gitea.io/api/swagger#/repository/repoGetAllCommits
-> expected returns are 200, 404 and 409 for example

@mmarif @opyale I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks https://try.gitea.io/api/swagger#/repository/repoGetAllCommits -> expected returns are 200, 404 and 409 for example
6543 changed title from Improve 404 calls to Fix infined load on Issues/Pulls if they dont exist & Refactor 2020-05-23 17:07:29 +00:00
6543 added
Bug
LGTM-need
and removed
Improvement
labels 2020-05-23 17:07:49 +00:00
Author
Owner

I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks

I am fine with it. Just curious, what are the advantages of switch over if?

> I would add a new coding rule: on a api call always check the http code since this indicate if it succeeded or not and if there are more than 2 posible codes use switch-case instead of else-if-blocks I am fine with it. Just curious, what are the advantages of switch over if?
Author
Owner

@6543 This PR with the your commits became very huge and unreadable.

Can we focus on the issue and pr calls in this PR which will fix the inifinite loop issue?

Reformat code: new PR

Change to switch cases: new PR

What you think?

@6543 This PR with the your commits became very huge and unreadable. Can we focus on the issue and pr calls in this PR which will fix the inifinite loop issue? Reformat code: new PR Change to switch cases: new PR What you think?
6543 changed title from Fix infined load on Issues/Pulls if they dont exist & Refactor to Fix infined load on Issues/Pulls if they dont exist 2020-05-23 18:23:29 +00:00
6543 force-pushed fix-404-errors from c0eccbacd4 to 67e9a694e9 2020-05-23 18:25:09 +00:00 Compare
Member

@mmarif removed

@mmarif removed
6543 added
LGTM-done
and removed
LGTM-need
labels 2020-05-23 18:26:06 +00:00
6543 approved these changes 2020-05-23 18:26:36 +00:00
Dismissed
6543 left a comment
Member

fix itself works excelent

fix itself works excelent
6543 merged commit 34f8f82b63 into master 2020-05-23 18:30:39 +00:00
6543 deleted branch fix-404-errors 2020-05-23 18:30:48 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#507
No description provided.