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

Events - empty array elements as [] not null #33288

Closed
hwaastad opened this issue Jan 15, 2025 · 1 comment
Closed

Events - empty array elements as [] not null #33288

hwaastad opened this issue Jan 15, 2025 · 1 comment

Comments

@hwaastad
Copy link

Description

Hi,
Currently, if a pull_request has no assignees, the event will have the following:

{
  "event": {
    "pull_request": {
      "assignees": null
    }
  }

I think it would be a better (and more intuitive) way to define arrays as empty [] rather than null (null-safe). This is also more aligned to github events.

Other arrays are:
topics
labels
requested_reviewers
requested_reviewers_teams

Gitea Version

1.23.1

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?

k8s, docker

Database

PostgreSQL

@hwaastad hwaastad changed the title Events array empty array elements as [] not null Events - empty array elements as [] not null Jan 22, 2025
@wxiaoguang
Copy link
Contributor

I added SliceNilAsEmpty in #33569 and covered your findings.

@lunny lunny closed this as completed in e741448 Feb 12, 2025
@lunny lunny added this to the 1.23.4 milestone Feb 12, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Feb 12, 2025
…, fuzzy prompt, mirror proxy, adopt git) (go-gitea#33569)

* Make artifact list output a stable order
* Fix go-gitea#33506
* Fix go-gitea#33521
* Fix go-gitea#33288
* Fix go-gitea#33196
* Fix go-gitea#33561
lunny pushed a commit that referenced this issue Feb 12, 2025
…, fuzzy prompt, mirror proxy, adopt git) (#33569) (#33577)

Backport #33569 by @wxiaoguang

* Make artifact list output has stable order
* Fix #33506
* Fix #33521
* Fix #33288
* Fix #33196
* Fix #33561

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants