Skip to content

Action status check in pr is not updated #23674

New issue

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

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

Already on GitHub? Sign in to your account

Closed
Yiklek opened this issue Mar 24, 2023 · 8 comments · Fixed by #23613 or #23683
Closed

Action status check in pr is not updated #23674

Yiklek opened this issue Mar 24, 2023 · 8 comments · Fixed by #23613 or #23683
Assignees
Labels

Comments

@Yiklek
Copy link

Yiklek commented Mar 24, 2023

Description

Action status check is not updated on the pull_request synchronize event.

# .gitea/workflows/build.yaml
name: Gitea Actions Demo
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
on:
  pull_request: yes
  push:
    branches:
      - main
jobs:
  Explore-Gitea-Actions:
    runs-on: ubuntu-20.04
    steps:
      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
      - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
      - name: Check out repository code
        uses: actions/checkout@v3
      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
      - name: List files in the repository
        run: |
          ls ${{ github.workspace }}
      - run: echo "🍏 This job's status is ${{ job.status }}."

I create a PR #3 from dev to main, and the status check is enabled. When I push a commit 1703af8060 to dev, action is triggered. But the status check on the PR page is not updated.

commit page
image

action page
image

Gitea Version

df41181

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

build Gitea myself
run from command-line

Database

SQLite

@wolfogre
Copy link
Member

wolfogre commented Mar 24, 2023

Should be fixed by #23613, so I believe we will have it on v1.19.1

@wolfogre wolfogre linked a pull request Mar 24, 2023 that will close this issue
@Yiklek
Copy link
Author

Yiklek commented Mar 24, 2023

@wolfogre My build is newer than #23613
Snipaste_2023-03-24_10-05-40

@wolfogre wolfogre reopened this Mar 24, 2023
@wolfogre
Copy link
Member

@Zettat123 Could you please take a look at it?

@Zettat123 Zettat123 self-assigned this Mar 24, 2023
@Zettat123
Copy link
Contributor

@Yiklek Could you please change

on:
  pull_request: yes
  push:
    branches:
      - main

to

on: pull_request

and test again?

@Yiklek
Copy link
Author

Yiklek commented Mar 24, 2023

@Yiklek Could you please change

on:
  pull_request: yes
  push:
    branches:
      - main

to

on: pull_request

and test again?

@Zettat123 It doesn't work on the pull_request synchronize event yet. The status check is only updated on PR opened.

image

@yp05327
Copy link
Contributor

yp05327 commented Mar 24, 2023

Maybe the reason is that PR's branch is from the same repo.

@Zettat123
Copy link
Contributor

Zettat123 commented Mar 24, 2023

Maybe the reason is that PR's branch is from the same repo.

I think not. In my test, pull_request_sync event can be triggerd by a PR from the same repo.

Maybe my test is incorrect. I'll test again later.

@yp05327
Copy link
Contributor

yp05327 commented Mar 24, 2023

Maybe the reason is that PR's branch is from the same repo.

I can reproduce this in gitea.com and PR's repo is not related

https://gitea.com/yp05327/testrepo/pulls/1
https://gitea.com/yp05327/testrepo/pulls/2

@Zettat123 Zettat123 assigned sillyguodong and unassigned Zettat123 Mar 24, 2023
jolheiser pushed a commit that referenced this issue Mar 24, 2023
Fix: #23674
If the type of `hook_event` is `pull_request_sync`, also need to insert
a record of `commit_status` into DB.
Because `pull_request` event and `pull_request_sync` event have the same
payload, so the code is reusable.

Screenshot:

![image](https://user-images.githubusercontent.com/33891828/227465436-1b436807-d0b2-4a2b-8890-09d96c7f666d.png)
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 24, 2023
Fix: go-gitea#23674
If the type of `hook_event` is `pull_request_sync`, also need to insert
a record of `commit_status` into DB.
Because `pull_request` event and `pull_request_sync` event have the same
payload, so the code is reusable.

Screenshot:

![image](https://user-images.githubusercontent.com/33891828/227465436-1b436807-d0b2-4a2b-8890-09d96c7f666d.png)
techknowlogick pushed a commit that referenced this issue Mar 24, 2023
Backport #23683 by @sillyguodong

Fix: #23674
If the type of `hook_event` is `pull_request_sync`, also need to insert
a record of `commit_status` into DB.
Because `pull_request` event and `pull_request_sync` event have the same
payload, so the code is reusable.

Screenshot:

![image](https://user-images.githubusercontent.com/33891828/227465436-1b436807-d0b2-4a2b-8890-09d96c7f666d.png)

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
5 participants