Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

status with short sha is not the same as with long sha #13485

Closed
2 of 6 tasks
amiga23 opened this issue Nov 9, 2020 · 0 comments · Fixed by #22244
Closed
2 of 6 tasks

status with short sha is not the same as with long sha #13485

amiga23 opened this issue Nov 9, 2020 · 0 comments · Fixed by #22244
Labels

Comments

@amiga23
Copy link

amiga23 commented Nov 9, 2020

  • Gitea version (or commit ref): 1.12.5 built with GNU Make 4.2.1, go1.14.9 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.24.3
  • Operating system: Container image gitea/gitea:1.12.5 on aarch64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

  1. Create Status "pending" with short sha 👍
    curl -X POST "https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc?access_token=xxxxxx" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"context\": \"argo\",  \"description\": \"Build started\",  \"state\": \"pending\",  \"target_url\": \"https://some.where/argo/workflows\"}"
    
  2. Check that status was created with short SHA 👍
    curl https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc
    
  3. Check that status was created with long SHA -> No it is not 👎
    Returns empty array
    curl https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc713f117a7295cefa8d5f44ada88ba5
    
  4. Check if status is shown in UI -> No it is not 👎
    https://try.gitea.io/status-test/status-test/commits/branch/master
  5. Create Status "success" with long sha 👍
    curl -X POST "https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc713f117a7295cefa8d5f44ada88ba5?access_token=xxxxxx" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"context\": \"argo\",  \"description\": \"Build started\",  \"state\": \"success\",  \"target_url\": \"https://some.where/argo/workflows\"}"
    
  6. Check if Status was created with long SHA 👍
    Shows status "success"
    curl https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc713f117a7295cefa8d5f44ada88ba5
    
  7. Check if Status was created with short SHA 👎
    Still shows status "pending"
    curl https://try.gitea.io/api/v1/repos/status-test/status-test/statuses/2d391d1efc
    
  8. Check if Status is shown in UI 👍
    https://try.gitea.io/status-test/status-test/commits/branch/master

...

Screenshots

@lunny lunny added the type/bug label Nov 29, 2022
lunny added a commit that referenced this issue Dec 27, 2022
Fix #13485.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
KN4CK3R pushed a commit that referenced this issue Dec 28, 2022
Backport #22244.

Fix #13485.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
KN4CK3R pushed a commit that referenced this issue Dec 28, 2022
Backport #22244.

Fix #13485.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants