Azure / webapps-deploy

Enable GitHub developers to deploy to Azure WebApps using GitHub Actions
MIT License
265 stars 193 forks source link

Allow an override of the Deployment History's fields #442

Open bradyclifford opened 3 days ago

bradyclifford commented 3 days ago

Allow the following fields on the https://<app_name>.scm.azurewebsites.net/api/deployments POST request made by this action to be overridden.

Right now the message to OneDeploy. Which is not that helpful.

POST https://<app_name>.scm.azurewebsites.net/api/deployments
{
  "id": "deployment-id",
  "status": 0,                    // Numeric status (e.g., 0 = pending, 3 = success, 4 = failed)
  "message": "Deployment initiated", // A message describing the deployment
  "author": "AuthorName",          // Name of the person who initiated the deployment
  "deployer": "DeployerName",      // Optional, who performed the deployment (could be the same as the author)
  "details": "Custom deployment details", // Optional, additional details for tracking
  "active": false,                 // Whether this deployment should be set as active immediately
  "log_url": "http://yourlog.com", // Optional, URL to deployment logs
  "received_time": "2023-09-21T14:32:00Z", // Optional, time the deployment was received
  "start_time": "2023-09-21T14:35:00Z",    // Optional, when the deployment started
  "end_time": "2023-09-21T14:45:00Z"       // Optional, when the deployment completed
}

image

bradyclifford commented 3 days ago

Here is a direct output of one of my deployments using this action. Notice that the author is not even being populated.

{
    "id": "ec66c34ac18c5d5bd74db108050",
    "status": 4,
    "status_text": "",
    "author_email": "N/A",
    "author": "N/A",
    "deployer": "OneDeploy",
    "message": "OneDeploy",
    "progress": "",
    "received_time": "2024-09-17T14:02:56.1941923Z",
    "start_time": "2024-09-17T14:02:56.5848446Z",
    "end_time": "2024-09-17T14:03:06.7107043Z",
    "last_success_end_time": "2024-09-17T14:03:06.7107043Z",
    "complete": true,
    "active": true,
    "is_temp": false,
    "is_readonly": true,
    "url": "https://{obfuscated}.scm.azurewebsites.net/api/deployments/ec66c34ac18c5d5bd74db108050",
    "log_url": "https://{obfuscated}.scm.azurewebsites.net/api/deployments/ec66c34ac18c5d5bd74db108050/log",
    "site_name": "{obfuscated}",
    "provisioningState": "Succeeded"
  },