Previously one needed to provide only digits, (e.g. `123`), otherwise
scripts would fail to recognise supplied argument as an issue number.
Github almost everywhere precedes PR numbers with hash sign, so it might
be easier/faster to copypaste PR number with along with preceding hash.
With the change scripts will ignore the first preceding hash in the
supplied PR number.
Add missing copyright stuff to `merge-pr.sh`.
Refactored & split `merge-pr.sh` script, since most of required
code for `test-pr.sh` already existed there.
Differences from `merge-pr.sh`:
* if there's no `upstream` remote, https version is used instead of
git
* merge commit *is not* GPG-signed (less hassle)
* merge branch is named e.g. `test1234` instead of `merge1234`
* instructions for pushing test branch onto upstream master are not
printed
Message appears only if merge was unsuccessful and makes deleting
as quick as copypasting.
Check makes sure that supplied argument is actually an number, which
helps avoid waiting for git to eror out on "no remote branch".
Additionally, renamed `original` upstream to `upstream`, according to
@sudden6's suggestion.
This allows to close related to PR issues when PR submitter forgets to
include that in commit message, or add some other additional info.
E.g. `./merge-pr.sh 3033 'Fu fu fu. :3'` would result in:
```
Merge pull request #3033
Fu fu fu. :3
sudden6 (1):
update friend activity on groupchat events fixes#2848
```
Merge messages are composed of PR number + appended shortlog.
Script is supposed to work only if there are no merge conflicts.
Example usage: `./merge-pr.sh 1234`