app/controllers/extensions_controller.rb
#
# POST /assets/:username/:id/build
#
# Triggers a release build of the specified asset.
# Returns one of the following HTTP status codes:
#   2XX - Success
#   401 - Invalid or missing X-GitHub-Token header
#   403 - GitHub user not authorized for the specified asset
#   404 - Unknown GitHub repo for the asset
#
# Requires an +X-GitHub-Token+ header containing a GitHub personal access token (PAT)
# belonging to a user who is a collaborator on the project.
# See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.
# The header must use the +X-GitHub-Token+ key, as in:
#   X-GitHub-Token: ${GITHUB_PERSONAL_ACCESS_TOKEN}
#
POST /assets/:username/:id/build
Triggers a release build of the specified asset.

Requires an +X-GitHub-Token+ header containing a GitHub personal access token (PAT)
belonging to a user who is a collaborator on the project.
POST / assets / : username / : id / build Triggers a release build of the specified asset . Requires an + X - GitHub - Token + header containing a GitHub personal access token ( PAT ) belonging to a user who is a collaborator on the project .
def build
    github_token = request.headers['X-GitHub-Token']
    status_code_symbol = with_collaborator_authorization(github_token, @extension) do
      CollectExtensionMetadataWorker.perform_async(@extension.id, [])
    end
    head status_code_symbol
  end
def build github_token = request . headers [ 'X-GitHub-Token' ] status_code_symbol = with_collaborator_authorization ( github_token , @extension ) do CollectExtensionMetadataWorker . perform_async ( @extension . id , [ ] ) end head status_code_symbol end
POST /assets/:username/:id/build
Triggers a release build of the specified asset.
POST / assets / : username / : id / build Triggers a release build of the specified asset .