Accept custom refs other than tags and branches in workflow dispatch API

I’m building a webhook system to trigger GitHub Actions workflows through Gerrit events, to perform code check against an open change in Gerrit, for example. However, when triggering a GitHub workflow using the workflow dispatch API and passing the ref information for the Gerrit change, GitHub refuses the request saying that the reference does not exist (while it’s not true).

Example

Request

POST https://api.github.com/repos/felipecrs/gerrit-jenkins/actions/workflows/ci.yaml/dispatches
Authorization: Basic felipecrs:<hidden>
Content-Type: application/json

{
    "ref": "refs/changes/35/514035/3"
}

Response

422 Unprocessable Entity

{
  "message": "No ref found for: refs/changes/35/514035/3",
  "documentation_url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event"
}

However, the reference does exist in GitHub:

❯ git fetch https://github.com/felipecrs/gerrit-jenkins refs/changes/35/514035/3
From https://github.com/felipecrs/gerrit-jenkins
 * branch            refs/changes/35/514035/3 -> FETCH_HEAD

I believe GitHub tolerate Gerrit refs but does not really support them.
We (Gerrit project) replicate all changes to github.com/gerritcodereview/gerrit but I’ve noticed that even though they aren’t fully discoverable.

One possibility could be performing a mapping of refs when pushed to a replication endpoint, so that refs/changes/* could be remapped to refs/heads/changes/*. What do you think?

I think a solution like this can be considered, as there isn’t any forecast of GitHub accepting such feature request.

See this other one, very related: Github Action: trigger on a custom references, not branches or tags - #8 by shrink

It has been more than 6 months and there isn’t even an official response from GitHub staff.

:face_with_raised_eyebrow: