Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Giteabot
1543ac9c8d
Fix missing commit status in PR which from forked repo (#23351) (#23453)
Backport #23351 by @sillyguodong
close: #23347
### Reference and Inference
According to Github REST API
[doc](https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#list-commit-statuses-for-a-reference):
1. The `Drone CI` that can create some commit status by
[API](https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status)
is enabled in `go-gitea/gitea`. So I tried to call the API to get a
commit status list of a PR which is commited to upstream
repo(`go-gitea/gitea`). As a result, the API returned a array of commit
status.
![image](https://user-images.githubusercontent.com/33891828/223913371-313d047a-5e2e-484c-b13e-dcd38748703e.png)
2. Then I tried to call the API to get commit status list of the
reference which of the `SHA` is the same as step 1 in the repo which is
forked from `go-gitea/gitea`. But I got a empty array.
![image](https://user-images.githubusercontent.com/33891828/223930827-17a64d3c-f466-4980-897c-77fe386c4d3b.png)
So, I believe it that:
1. The commit status is not shared between upstream repo and forked
repo.
2. The coomit status is bound to a repo that performs actions. (Gitea's
logic is the same)
### Cause
During debugging, I found it that commit status are not stored in the DB
as expected.
So, I located the following code:
8cadd51bf2/services/actions/commit_status.go (L18-L26)
When I create a PR, the type of `event` is `pull request`, not `push`.
So the code return function directly.
### Screenshot
![image](https://user-images.githubusercontent.com/33891828/223939339-dadf539c-1fdd-40c4-96e9-2e4fa733f531.png)
![image](https://user-images.githubusercontent.com/33891828/223939519-edb02bf0-2478-4ea5-9366-be85468f02db.png)
![image](https://user-images.githubusercontent.com/33891828/223939557-ec6f1375-5536-400e-8987-fb7d2fd452fa.png)
### Other
In this PR, I also fix the problem of missing icon which represents
running in PRs list.
![image](https://user-images.githubusercontent.com/33891828/223939898-2a0339e4-713f-4c7b-9d99-2250a43f3457.png)
![image](https://user-images.githubusercontent.com/33891828/223939979-037a975f-5ced-480c-bac7-0ee00ebfff4b.png)
Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
|
2 years ago |
.. |
admin
|
Support reflogs (#22451) (#23438)
|
2 years ago |
api/packages/pypi
|
Add Package Registry (#16510)
|
3 years ago |
base
|
Fix various bugs for "install" page (#23194) (#23286)
|
2 years ago |
code
|
Remove Fomantic-UI's `.hidden` CSS class for menu elements (#22895)
|
2 years ago |
custom
|
Add footer extra links template (#9576)
|
5 years ago |
explore
|
Add context cache as a request level cache (#22294)
|
2 years ago |
mail
|
Revert relative links to absolute links in mail templates (#23267) (#23269)
|
2 years ago |
org
|
Add missing tabs to org projects page (#22705) (#23412)
|
2 years ago |
package
|
Fix nil context in RenderMarkdownToHtml (#23092) (#23108)
|
2 years ago |
projects
|
Show edit/close/delete button on organization wide repositories (#23388) (#23429)
|
2 years ago |
repo
|
Fix missing commit status in PR which from forked repo (#23351) (#23453)
|
2 years ago |
shared
|
Fix incorrect project links and use symlink icon for org-wide projects (#23325) (#23336)
|
2 years ago |
status
|
Move helpers to be prefixed with `gt-` (#22879)
|
2 years ago |
swagger
|
Purge API comment (#23451) (#23452)
|
2 years ago |
user
|
Add missing tabs to org projects page (#22705) (#23412)
|
2 years ago |
home.tmpl
|
Add main landmark to templates and adjust titles (#22670)
|
2 years ago |
install.tmpl
|
Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950)
|
2 years ago |
post-install.tmpl
|
Fix various bugs for "install" page (#23194) (#23286)
|
2 years ago |