Skip to content

Long commit message on zipdeploy still not trimmed enough - opt out of sending commit messages? #448

@ZTonks

Description

@ZTonks

Seems to be a reocurrence of #288. In that issue it was discussed that 7000 wasn't enough, and 1000 was arrived at.

In our GitHub pipelines our PR descriptions can include autopopulated HTML, and despite the supposed limit of 1000 characters, the actual URL used to POST to Azure for the zip deployment was 2217 characters long.

The actual query string itself was 2075 characters. It is possible that encoding various characters to ASCII for the query string actually means that this trim down to 1000 can't actually suffice unless the commit message was ASCII to start with.

It seems like it might be of interest to actually just be able to opt out of sending the commit payload, as an example we do not use the end result i.e. the commit history in deployment center. This is probably more sane than chasing character limits.

Example change to actionparameters.ts that may allow this:

    private constructor(endpoint: IAuthorizer) {
        this._publishProfileContent = core.getInput('publish-profile');
        this._appName = core.getInput('app-name');
        this._slotName = core.getInput('slot-name');
        this._packageInput = core.getInput('package');
        this._images = core.getInput('images');
        this._multiContainerConfigFile = core.getInput('configuration-file');
        this._startupCommand = core.getInput('startup-command');
        this._resourceGroupName = core.getInput('resource-group-name');
        this._omitCommitPayload = core.getInput('omit-commit-payload');
        /**
         * Trimming the commit message because it is used as a param in uri of deployment api. And sometimes, it exceeds the max length of http URI.
         */
        this._commitMessage = !this._omitCommitPayload && github.context.eventName === 'push'
            ? github.context.payload.head_commit.message.slice(0, 1000)
            : "";
        this._endpoint = endpoint;

        // Used only for OneDeploy
        this._type = core.getInput('type');
        this._targetPath = core.getInput('target-path');
        this._clean = core.getInput('clean');
        this._restart = core.getInput('restart');
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions