Debian Codegraph @

hacking/backport/README.md

raw
1 # backport scripts
2
3 This directory contains scripts useful for dealing with and maintaining
4 backports. Scripts in it depend on pygithub, and expect a valid environment
5 variable called `GITHUB_TOKEN`.
6
7 To generate a Github token, go to <https://github.com/settings/tokens/new>
8
9 ## `backport_of_line_adder.py`
10
11 This script will attempt to add a reference line ("Backport of ...") to a new
12 backport PR.
13
14 It is called like this:
15
16 ```shell
17 ./backport_of_line_adder.py <backport> <original PR>
18 ```
19
20 However, it contains some logic to try to automatically deduce the original PR
21 for you. You can trigger that logic by making the second argument be `auto`.
22
23 ```shell
24 ./backport_of_line_adder.py 12345 auto
25 ```
26
27 ... for example, will look for an appropriate reference to add to backport PR #12345.
28
29 The script will prompt you before making any changes, and give you a chance to
30 review the PR that it is about to reference.
31
32 It will add the reference right below the 'SUMMARY' header if it exists, or
33 otherwise it will add it to the very bottom of the PR body.