aboutsummaryrefslogtreecommitdiffstats
path: root/etc/ci/performance/git_log_to_json.sh
blob: 3fdd6e887b7721ad1e9dbcdc90f806528560e1a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

set -o errexit
set -o nounset
set -o pipefail

# Don't include body to prevent multiline and unescaped body string
git log -n 1 --pretty=format:'{%n  "commit": "%H",%n  "subject": "%s",%n
  "author": {%n    "name": "%aN",%n    "email": "%aE",%n
    "timestamp": "%at"%n  }%n  %n}'