diff options
author | Norwin <noerw@users.noreply.github.com> | 2021-03-13 18:06:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 19:06:52 +0100 |
commit | 658d1bfac8c4706d83004c4069cd52ef63fb71cb (patch) | |
tree | bd92f05b5483e6a7dd12c2f9912c3f71a4ddc178 /models/fixtures | |
parent | e256a62257df85c9fdb53426cc5b28bf422d91af (diff) | |
download | gitea-658d1bfac8c4706d83004c4069cd52ef63fb71cb.tar.gz gitea-658d1bfac8c4706d83004c4069cd52ef63fb71cb.zip |
API: fix set milestone on PR creation (#14981)
* API: fix set milestone on PR creation
pr creation via API failed with 404, because we searched
for milestoneID 0, due to uninitialized var usage D:
* add tests
* fix expected status codes
* fix tests
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/fixtures')
-rw-r--r-- | models/fixtures/label.yml | 8 | ||||
-rw-r--r-- | models/fixtures/milestone.yml | 8 | ||||
-rw-r--r-- | models/fixtures/repository.yml | 3 |
3 files changed, 18 insertions, 1 deletions
diff --git a/models/fixtures/label.yml b/models/fixtures/label.yml index 3ad82eebed..1b7ce74681 100644 --- a/models/fixtures/label.yml +++ b/models/fixtures/label.yml @@ -33,3 +33,11 @@ num_issues: 1 num_closed_issues: 0 +- + id: 5 + repo_id: 10 + org_id: 0 + name: pull-test-label + color: '#000000' + num_issues: 0 + num_closed_issues: 0 diff --git a/models/fixtures/milestone.yml b/models/fixtures/milestone.yml index b9894a1009..2cd994e63a 100644 --- a/models/fixtures/milestone.yml +++ b/models/fixtures/milestone.yml @@ -29,3 +29,11 @@ content: content random is_closed: false num_issues: 0 + +- + id: 5 + repo_id: 10 + name: milestone of repo 10 + content: for testing with PRs + is_closed: false + num_issues: 0 diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index 952408b0c2..492040316c 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -148,6 +148,7 @@ num_closed_issues: 0 num_pulls: 1 num_closed_pulls: 0 + num_milestones: 1 is_mirror: false num_forks: 1 status: 0 @@ -734,4 +735,4 @@ num_watches: 0 num_projects: 0 num_closed_projects: 0 - status: 0
\ No newline at end of file + status: 0 |