Skip to content
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

Refactor commit status for Actions jobs #23786

Merged
merged 8 commits into from
Mar 29, 2023
Merged

Refactor commit status for Actions jobs #23786

merged 8 commits into from
Mar 29, 2023

Conversation

wolfogre
Copy link
Member

@wolfogre wolfogre commented Mar 29, 2023

Before:
xnip_230329_163852
After:
xnip_230329_163358

Highlights:

  • Treat StatusSkipped as CommitStatusSuccess instead of CommitStatusFailure, so it fixed [actions] Skipped jobs are displayed as failed #23599.
  • Use the bot user gitea-actions instead of the trigger as the creator of commit status.
  • New format <run_name> / <job_name> / (<event>) for the context of commit status to avoid conflicts.
  • Add descriptions for commit status.
  • Add the missing calls to CreateCommitStatus.
  • Refactor CreateCommitStatus to make it easier to use.

@wolfogre wolfogre added type/bug type/enhancement An improvement of existing functionality topic/gitea-actions related to the actions of Gitea outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Mar 29, 2023
@wolfogre wolfogre added this to the 1.20.0 milestone Mar 29, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 29, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 29, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 29, 2023
@delvh delvh changed the title Improve commit status for Actioins jobs Refactor commit status for Actions jobs Mar 29, 2023
@jolheiser
Copy link
Member

🎺 🤖

@jolheiser jolheiser enabled auto-merge (squash) March 29, 2023 15:04
@jolheiser jolheiser merged commit 3e8db31 into go-gitea:main Mar 29, 2023
@jolheiser jolheiser removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 29, 2023
@GiteaBot
Copy link
Collaborator

I was unable to create a backport for 1.19, please send one manually. 🍵

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Mar 29, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 31, 2023
* upstream/main:
  [skip ci] Updated translations via Crowdin
  Fix dropdown direction behavior (go-gitea#23806)
  Fix incorrect/Improve error handle in edit user page (go-gitea#23805)
  Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (go-gitea#23790)
  Fix incorrect visibility dropdown list in add/edit user page (go-gitea#23804)
  Convert issue list checkboxes to native (go-gitea#23596)
  Fix checks for `needs` in Actions (go-gitea#23789)
  Diff improvements (go-gitea#23553)
  [Patch] Fix closed PR also triggers Webhooks and actions (go-gitea#23782)
  Improve backport-locales.go (go-gitea#23807)
  [skip ci] Updated translations via Crowdin
  Refactor commit status for Actions jobs (go-gitea#23786)
  Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (go-gitea#23766)
  Don't apply the group filter when listing LDAP group membership if it is empty (go-gitea#23745)
denyskon pushed a commit to denyskon/gitea that referenced this pull request Apr 11, 2023
Refactor commit status for Actions jobs (go-gitea#23786)

Before:
<img width="353" alt="xnip_230329_163852"
src="https://user-images.githubusercontent.com/9418365/228479807-424452df-10fa-45cf-ae4b-09939c0ed54c.png">
After:
<img width="508" alt="xnip_230329_163358"
src="https://user-images.githubusercontent.com/9418365/228479923-537b54fe-9564-4105-a068-bcc75fa2a7ea.png">

Highlights:
- Treat `StatusSkipped` as `CommitStatusSuccess` instead of
`CommitStatusFailure`, so it fixed go-gitea#23599.
- Use the bot user `gitea-actions` instead of the trigger as the creator
of commit status.
- New format `<run_name> / <job_name> / (<event>)` for the context of
commit status to avoid conflicts.
- Add descriptions for commit status.
- Add the missing calls to `CreateCommitStatus`.
- Refactor `CreateCommitStatus` to make it easier to use.
@6543 6543 added the backport/done All backports for this PR have been created label Apr 11, 2023
techknowlogick pushed a commit that referenced this pull request Apr 12, 2023
Backport #23786

Refactor commit status for Actions jobs (#23786)

Highlights:
- Treat `StatusSkipped` as `CommitStatusSuccess` instead of
`CommitStatusFailure`, so it fixed #23599.
- Use the bot user `gitea-actions` instead of the trigger as the creator
of commit status.
- New format `<run_name> / <job_name> / (<event>)` for the context of
commit status to avoid conflicts.
- Add descriptions for commit status.
- Add the missing calls to `CreateCommitStatus`.
- Refactor `CreateCommitStatus` to make it easier to use.

Co-authored-by: Jason Song <i@wolfogre.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
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 topic/gitea-actions related to the actions of Gitea type/bug type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[actions] Skipped jobs are displayed as failed
6 participants