File: filter-example.py

package info (click to toggle)
irker 2.18%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 408 kB
  • ctags: 288
  • sloc: python: 2,031; xml: 1,001; makefile: 196; sh: 122
file content (13 lines) | stat: -rwxr-xr-x 336 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python
# This is a trivial example of a metadata filter.
# All it does is change the name of the commit's author.
# It could do other things, including modifying the
# channels list
# 
import sys, json
metadata = json.loads(sys.argv[1])

metadata['author'] = "The Great and Powerful Oz"

print json.dumps(metadata)
# end