go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.38k stars 5.33k forks source link

Support for "search/issues" API from GitHub #31154

Closed kctang closed 1 month ago

kctang commented 1 month ago

Description

Is search/issues API from GitHub supported? If not, and plans/ETA to implement it?


Background/Details

Trying to use @semantic-release/github in my Gitea repo. It works if I disable successComment and failComment as these steps seems to perform a search that is not compatible with Gitea.

My test .releaserc looks something like this:

{  
  "branches": ["main"],  
  "repositoryUrl": "https://xxx/my-org/test.git",  
  "plugins": [  
    "@semantic-release/commit-analyzer",  
    "@semantic-release/release-notes-generator",  
    "@semantic-release/changelog",  
    [  
      "@semantic-release/git",  
      {  
        "assets": ["CHANGELOG.md", "package.json", "package-lock.json"],  
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"  
      }  
    ],  
    [  
      "@semantic-release/github",  
      {  
        "githubUrl": "https://xxx",  
        "githubApiPathPrefix": "/api/v1",  
        "successComment": false,  
        "failTitle": false,  
        "failComment": false  
      }  
    ]  
  ]  
}

If I do not set successComment and failComment to false, when Gitea action runs, I will get:

[semantic-release] › ✘ An error occurred while running semantic-release: RequestError [HttpError]: 404 page not found

# for the following URL (i decoded it for ease of reading)

https://xxx/api/v1/search/issues?q=repo:my-org/test+type:pr+is:merged+b2c210e22ae555c72b558ac1cad301a72b7da678+1b9064ab221042e2308b0914f2970853f4aa3c17+4dfea9afa9eaf49184166b689a7f2fd514e97ade+829bd9c0a62c9af1fb8140c244834d96d8fd762d+9753873f431dbc31ad121a9427803c6f3078cde8

# it looks like Gitea does not support the API search format above

I believe on of the @semantic-release/github step involves search for issues in the repository.

Other that this issue, it looks like we can directly use @semantic-release/github to perform semantic release. I am aware of saitho/semantic-release-gitea but looks like no longer maintain so I did not want to use that.

Gitea Version

1.21.11

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?

Self hosted, docker based installation.

Database

MySQL/MariaDB

lunny commented 1 month ago

If you want a new API, please check whether that API has/has not implemented. And if not, it should be a proposal but not a bug.

kctang commented 1 month ago

My apologies. I should not have mark it as a bug. Looking at the API docs, looks like this has not been implemented.

I will recreate it as a proposal instead. Thanks for quick response.