CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 07:44:08 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"9e009f162bafc47c71edd1b32659892e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=LSPf5HwcI39uaedTP%2Bl7O46LHVnEGD4lS689C0TnEubkbH5Ddp7u78bUpkI1pjA2LqcVVARu8lgEk8oz3kqZTy48EH2DYsoOjxWrCBsgEr02GrqgU1KxyrwBoroNev0NFezuDHjMCoETbe0x9AkB1zxD0NKLfw1JWHzHXGDZLk262B6F90Fb0ctLYAcNCKiRtzRKK4tzEpc%2BtvCe47s60hcUbneAHe2M90%2B7TyCA2PIYzm6c6ZnO%2BwFl6qpSXeiq%2FbKUSd7Q9t9VXHvelENi6A%3D%3D--9Hr8O1Q3GbtreT96--iQyKxnK4hTimi1TYKOS9ww%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1960996506.1753343047; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 07:44:07 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 07:44:07 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D8BC:12BD61:1607C7A:1A805B5:6881E447
7 Examples · antham/chyle Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 10
7 Examples
Anthony HAMON edited this page Dec 13, 2017
·
4 revisions
We will use this repository : https://github.com/antham/test-git, created for chyle testing purpose only, you can try examples on it. Don't forget to clone repository and adapt some environment variables to your configuration.
- Get a JSON ouput of all merge commits
- Get a markdown ouput of merge and regular commits
- Get a JSON ouput of all merge commits and contact github issue api to enrich payload
- Populate a release in github from CircleCI
commands :
export CHYLE_GIT_REFERENCE_FROM=a00ee81c109c8787f0ea161a776d2c9795f816cd
export CHYLE_GIT_REFERENCE_TO=f617fb708dfa6fa290205615ea98c53a860e499d
export CHYLE_GIT_REPOSITORY_PATH=/your-local-path/test-git
export CHYLE_MATCHERS_TYPE=merge
export CHYLE_SENDERS_STDOUT_FORMAT="json"
chyle create
output :
{
"datas": [
{
"authorDate": "2017-05-10 22:24:40 +0200 +0200",
"authorEmail": "antham@users.noreply.github.com",
"authorName": "Anthony HAMON",
"committerDate": "2017-05-10 22:24:40 +0200 +0200",
"committerEmail": "noreply@github.com",
"committerName": "GitHub",
"id": "f617fb708dfa6fa290205615ea98c53a860e499d",
"message": "Merge pull request #3 from antham/test2\n\nTest2",
"type": "merge"
},
{
"authorDate": "2017-05-10 22:22:03 +0200 +0200",
"authorEmail": "antham@users.noreply.github.com",
"authorName": "Anthony HAMON",
"committerDate": "2017-05-10 22:22:03 +0200 +0200",
"committerEmail": "noreply@github.com",
"committerName": "GitHub",
"id": "8fdfae00cbcc66936113a60f5146d110f2ba3c28",
"message": "Merge pull request #1 from antham/test\n\nTest",
"type": "merge"
}
],
"metadatas": {}
}
commands :
export CHYLE_GIT_REFERENCE_FROM=a00ee81c109c8787f0ea161a776d2c9795f816cd
export CHYLE_GIT_REFERENCE_TO=f617fb708dfa6fa290205615ea98c53a860e499d
export CHYLE_GIT_REPOSITORY_PATH=/your-local-path/test-git
export CHYLE_SENDERS_STDOUT_FORMAT="template"
export CHYLE_SENDERS_STDOUT_TEMPLATE='{{ range $key, $value := .Datas }}
{{ $value.id }} => **{{ regexFind ".*?\n" $value.message | trim }}** *({{ $value.authorName }} - {{ $value.authorDate | date "2006-01-02 15:04:05" }})*
{{ end }}'
chyle create
output :
f617fb708dfa6fa290205615ea98c53a860e499d => **Merge pull request #3 from antham/test2** *(Anthony HAMON - 2017-05-29 02:08:37)*
d8106fffee242f5b6394a103059b4064a83fcf3b => **Whatever** *(antham - 2017-05-29 02:08:37)*
e0a746c906fba7e2462f5717322b9eb55aca3943 => **Whatever** *(antham - 2017-05-29 02:08:37)*
118ad33a1d4ffc66bbeb74a1aba7524ef192ae62 => **Whatever** *(antham - 2017-05-29 02:08:37)*
78dcf412cc21d4054e06c534876200a89c04622e => **Whatever** *(antham - 2017-05-29 02:08:37)*
44fb3316ea67298df5a2b6fbb43795990575ec32 => **Whatever** *(antham - 2017-05-29 02:08:37)*
8fdfae00cbcc66936113a60f5146d110f2ba3c28 => **Merge pull request #1 from antham/test** *(Anthony HAMON - 2017-05-29 02:08:37)*
commands :
export CHYLE_GIT_REFERENCE_FROM=a00ee81c109c8787f0ea161a776d2c9795f816cd
export CHYLE_GIT_REFERENCE_TO=f617fb708dfa6fa290205615ea98c53a860e499d
export CHYLE_GIT_REPOSITORY_PATH=/your-local-path/test-git
export CHYLE_MATCHERS_TYPE=merge
export CHYLE_EXTRACTORS_GITHUBISSUEID_ORIGKEY=message
export CHYLE_EXTRACTORS_GITHUBISSUEID_DESTKEY=githubIssueId
export CHYLE_EXTRACTORS_GITHUBISSUEID_REG="\#(\d+)"
export CHYLE_DECORATORS_GITHUBISSUE_REPOSITORY_NAME=test-git
export CHYLE_DECORATORS_GITHUBISSUE_CREDENTIALS_OAUTHTOKEN=token
export CHYLE_DECORATORS_GITHUBISSUE_CREDENTIALS_OWNER=antham
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_NUMBER_DESTKEY=ticketNumber
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_NUMBER_FIELD=number
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_COMMENTNUMBER_DESTKEY=commentNumber
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_COMMENTNUMBER_FIELD=comments
export CHYLE_SENDERS_STDOUT_FORMAT="json"
chyle create
output :
{
"datas": [
{
"authorDate": "2017-05-10 22:24:40 +0200 +0200",
"authorEmail": "antham@users.noreply.github.com",
"authorName": "Anthony HAMON",
"commentNumber": 0,
"committerDate": "2017-05-10 22:24:40 +0200 +0200",
"committerEmail": "noreply@github.com",
"committerName": "GitHub",
"githubIssueId": 3,
"id": "f617fb708dfa6fa290205615ea98c53a860e499d",
"message": "Merge pull request #3 from antham/test2\n\nTest2",
"ticketNumber": 3,
"type": "merge"
},
{
"authorDate": "2017-05-10 22:22:03 +0200 +0200",
"authorEmail": "antham@users.noreply.github.com",
"authorName": "Anthony HAMON",
"commentNumber": 0,
"committerDate": "2017-05-10 22:22:03 +0200 +0200",
"committerEmail": "noreply@github.com",
"committerName": "GitHub",
"githubIssueId": 1,
"id": "8fdfae00cbcc66936113a60f5146d110f2ba3c28",
"message": "Merge pull request #1 from antham/test\n\nTest",
"ticketNumber": 1,
"type": "merge"
}
],
"metadatas": {}
}
Let's create a script release.sh
#!/usr/bin/env bash
set -e
### Functions
function setPreviousTag {
if [ ! -n "$1" ]; then
PREVIOUS_TAG="$(git describe --abbrev=0 --always --tags $2^)"
fi
if [[ $PREVIOUS_TAG =~ ^[0-9a-f]{40} ]];then
PREVIOUS_TAG_SHA="$(git rev-list --max-parents=0 HEAD|head -n 1)"
PREVIOUS_TAG="first commit"
return
fi
PREVIOUS_TAG_SHA="$(git rev-parse $PREVIOUS_TAG^{commit})"
}
function setCurrentTag {
local tag=""
if [ -n "$1" ]; then
tag="$1"
fi
if [ -n "$2" ]; then
tag="$2"
fi
if [ ! -n "$tag" ]; then
echo "You must declare CIRCLE_TAG or CURRENT_TAG variable"
exit 1
fi
CURRENT_TAG_SHA="$(git rev-parse $tag^{commit})"
CURRENT_TAG="$tag"
}
echo "-> Setup environment variables"
cd "$REPOSITORY_PATH"
setCurrentTag "$CURRENT_TAG" "$CIRCLE_TAG"
setPreviousTag "$PREVIOUS_TAG" "$CURRENT_TAG"
export CHYLE_GIT_REPOSITORY_PATH=$REPOSITORY_PATH
export CHYLE_GIT_REFERENCE_FROM=$PREVIOUS_TAG_SHA
export CHYLE_GIT_REFERENCE_TO=$CURRENT_TAG_SHA
# Setup matchers
## Pick only merge commits
export CHYLE_MATCHERS_TYPE=merge
# Setup decorators
## Setup github issue decorator
### Github issue id extractor
export CHYLE_EXTRACTORS_GITHUBISSUEID_ORIGKEY=message
export CHYLE_EXTRACTORS_GITHUBISSUEID_DESTKEY=githubIssueId
export CHYLE_EXTRACTORS_GITHUBISSUEID_REG="\#(\d+)"
### Github credentials
export CHYLE_DECORATORS_GITHUBISSUE_CREDENTIALS_OAUTHTOKEN=$GITHUB_TOKEN
export CHYLE_DECORATORS_GITHUBISSUE_CREDENTIALS_OWNER=antham
### Git path
export CHYLE_DECORATORS_GITHUBISSUE_REPOSITORY_NAME=$CIRCLE_PROJECT_REPONAME
### Extract title field
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_TITLE_DESTKEY=title
export CHYLE_DECORATORS_GITHUBISSUE_KEYS_TITLE_FIELD=title
# Setup senders
## Setup github release
### Github credentials
export CHYLE_SENDERS_GITHUBRELEASE_CREDENTIALS_OAUTHTOKEN=$GITHUB_TOKEN
export CHYLE_SENDERS_GITHUBRELEASE_CREDENTIALS_OWNER=antham
### Github release config
export CHYLE_SENDERS_GITHUBRELEASE_RELEASE_TAGNAME=$CIRCLE_TAG
export CHYLE_SENDERS_GITHUBRELEASE_RELEASE_UPDATE=true
export CHYLE_SENDERS_GITHUBRELEASE_RELEASE_TEMPLATE='{{ range $key, $value := .Datas }}
{{ $value.id }} => **{{ $value.title | trim }}** *({{ $value.authorName }} - {{ $value.authorDate | date "2006-01-02 15:04:05" }})*
{{ end }}'
### Git path
export CHYLE_SENDERS_GITHUBRELEASE_REPOSITORY_NAME=$CIRCLE_PROJECT_REPONAME
# Generate changelog
echo "-> Generating changelog between $PREVIOUS_TAG ($PREVIOUS_TAG_SHA) and $CURRENT_TAG ($CURRENT_TAG_SHA)"
In CircleCI (v1) we add a deployment section to trigger a build when a tag is created (we need to declare credentials envs inside circle settings project) :
machine:
environment:
REPOSITORY_PATH: $HOME/$CIRCLE_PROJECT_REPONAME
deployment:
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: antham
commands:
- ./release.sh
Now we can create a release in github (we create a tag in the same time), it triggers a circle build and at the end, chyle generates a diff between two tags and populate the release, check v1.0.0 release of test-git.
Clone this wiki locally
You can’t perform that action at this time.