Skip to content

Instantly share code, notes, and snippets.

@sorashi
Last active September 28, 2018 20:12

Revisions

  1. sorashi revised this gist Jan 20, 2018. 2 changed files with 36 additions and 33 deletions.
    33 changes: 0 additions & 33 deletions post.json
    Original file line number Diff line number Diff line change
    @@ -1,33 +0,0 @@
    {
    "embeds": [
    {
    "title": "Build {{buildId}}",
    "url": "{{buildUrl}}",
    "color": {{#passed}}40973{{/passed}}{{^passed}}11672839{{/passed}},
    "footer": {
    "icon_url": "{{#passed}}https://i.imgur.com/Rf4g8v6.png{{/passed}}{{^passed}}https://i.imgur.com/QaERwAW.png{{/passed}}",
    "text": "{{#passed}}Success{{/passed}}{{^passed}}Failure{{/passed}}"
    },
    "author": {
    "name": "{{commitAuthor}}",
    "url": "https://github.com/{{repositoryName}}/commit/{{commitId}}"
    },
    "fields": [
    {
    "name": "Commit",
    "value": "[{{commitMessage}}](https://github.com/{{repositoryName}}/commit/{{commitId}})"
    },
    {
    "name": "Duration",
    "value": "{{duration}}",
    "inline": true
    },
    {
    "name": "Build version",
    "value": "{{buildVersion}}",
    "inline": true
    }
    ]
    }
    ]
    }
    36 changes: 36 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,39 @@
    ```
    {
    "embeds": [
    {
    "title": "Build {{buildId}}",
    "url": "{{buildUrl}}",
    "color": {{#passed}}40973{{/passed}}{{^passed}}11672839{{/passed}},
    "footer": {
    "icon_url": "{{#passed}}https://i.imgur.com/Rf4g8v6.png{{/passed}}{{^passed}}https://i.imgur.com/QaERwAW.png{{/passed}}",
    "text": "{{#passed}}Success{{/passed}}{{^passed}}Failure{{/passed}}"
    },
    "author": {
    "name": "{{commitAuthor}}",
    "url": "https://github.com/{{repositoryName}}/commit/{{commitId}}"
    },
    "fields": [
    {
    "name": "Commit",
    "value": "[{{commitMessage}}](https://github.com/{{repositoryName}}/commit/{{commitId}})"
    },
    {
    "name": "Duration",
    "value": "{{duration}}",
    "inline": true
    },
    {
    "name": "Build version",
    "value": "{{buildVersion}}",
    "inline": true
    }
    ]
    }
    ]
    }
    ```

    Setup your webhook in AppVeyor → Settings → Notifications

    Want to know more parameters? AppVeyor provides this JSON object to use with [mustache](https://mustache.github.io/)
  2. sorashi created this gist Jan 20, 2018.
    33 changes: 33 additions & 0 deletions post.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    {
    "embeds": [
    {
    "title": "Build {{buildId}}",
    "url": "{{buildUrl}}",
    "color": {{#passed}}40973{{/passed}}{{^passed}}11672839{{/passed}},
    "footer": {
    "icon_url": "{{#passed}}https://i.imgur.com/Rf4g8v6.png{{/passed}}{{^passed}}https://i.imgur.com/QaERwAW.png{{/passed}}",
    "text": "{{#passed}}Success{{/passed}}{{^passed}}Failure{{/passed}}"
    },
    "author": {
    "name": "{{commitAuthor}}",
    "url": "https://github.com/{{repositoryName}}/commit/{{commitId}}"
    },
    "fields": [
    {
    "name": "Commit",
    "value": "[{{commitMessage}}](https://github.com/{{repositoryName}}/commit/{{commitId}})"
    },
    {
    "name": "Duration",
    "value": "{{duration}}",
    "inline": true
    },
    {
    "name": "Build version",
    "value": "{{buildVersion}}",
    "inline": true
    }
    ]
    }
    ]
    }
    70 changes: 70 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    Setup your webhook in AppVeyor → Settings → Notifications

    Want to know more parameters? AppVeyor provides this JSON object to use with [mustache](https://mustache.github.io/)

    ```json
    {
    "passed":true,
    "failed":false,
    "status":"Success",
    "started":"2014-04-14 7:57 PM",
    "finished":"2014-04-14 7:58 PM",
    "duration":"00:01:30.3741236",
    "projectId":12064,
    "projectName":"test-web",
    "buildId":14636,
    "buildNumber":26,
    "buildVersion":"1.0.26",
    "repositoryProvider":"gitHub",
    "repositoryScm":"git",
    "repositoryName":"JohnSmith/test-web",
    "branch":"master",
    "commitId":"ad2366f0c4",
    "commitAuthor":"John Smith",
    "commitAuthorEmail":"john@smith.com",
    "commitDate":"2014-04-14 1:54 AM",
    "commitMessage":"Some changes to appveyor.yml",
    "committerName":"John Smith",
    "committerEmail":"john@smith.com",
    "isPullRequest":true,
    "pullRequestId":1,
    "buildUrl":"https://ci.appveyor.com/project/JohnSmith/test-web/build/1.0.26",
    "notificationSettingsUrl":"https://ci.appveyor.com/notifications",
    "messages":[],
    "jobs":[
    {
    "id":"es941edratul5jm3",
    "name":"",
    "passed":true,
    "failed":false,
    "status":"Success",
    "started":"2014-04-14 7:57 PM",
    "finished":"2014-04-14 7:58 PM",
    "duration":"00:01:27.9060155",
    "messages":[],
    "compilationMessages":[
    {
    "category":"warning",
    "message":"Found conflicts between different versions of the same dependent assembly....",
    "details":"MSB3247",
    "fileName":"..\\..\\Program%20Files%20(x86)\\MSBuild\\12.0\\bin\\Microsoft.Common.CurrentVersion.targets",
    "line":1635,
    "column":5,
    "projectName":"MyWebApp",
    "projectFileName":"MyWebApp\\MyWebApp.csproj",
    "created":"2014-04-14T19:57:54.0838622+00:00"
    }
    ],
    "artifacts":[
    {
    "fileName":"MyWebApp.zip",
    "name":"MyWebApp",
    "type":"WebDeployPackage",
    "size":3491576,
    "url":"https://ci.appveyor.com/api/buildjobs/es941edratul5jm3/artifacts/token/261761baaaa8337f0a13fa8b5587451ff2d13e4cff095c74e6eabb5d5dea0909/MyWebApp.zip"
    }
    ]
    }
    ]
    }
    ```