| 1 |
#!/usr/bin/env bash |
| 2 |
#============================================================================= |
| 3 |
# Copyright 2017-2018 Kitware, Inc |
| 4 |
# |
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
# you may not use this file except in compliance with the License. |
| 7 |
# You may obtain a copy of the License at |
| 8 |
# |
| 9 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
# |
| 11 |
# Unless required by applicable law or agreed to in writing, software |
| 12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
# See the License for the specific language governing permissions and |
| 15 |
# limitations under the License. |
| 16 |
#============================================================================= |
| 17 |
|
| 18 |
# This script makes optional suggestions for working with GitHub. |
| 19 |
|
| 20 |
# Suggest pr alias |
| 21 |
echo ' |
| 22 |
This repository was configured with a `git pr` alias. The alias is useful when |
| 23 |
checking out pull requests locally for review. Fetch and check out a pull |
| 24 |
request by number with: |
| 25 |
|
| 26 |
git pr <pull-request-number> |
| 27 |
|
| 28 |
If curl and python3 are available, the pull request number can be omitted, and |
| 29 |
a list of open pull requests will be presented. |
| 30 |
' |
| 31 |
|
| 32 |
# Suggest gh |
| 33 |
if ! type gh >/dev/null 2>&1; then |
| 34 |
echo ' |
| 35 |
`gh` is a useful command line tool for working with GitHub. For installation |
| 36 |
and usage instructions, see: |
| 37 |
|
| 38 |
https://cli.github.com/ |
| 39 |
' |
| 40 |
fi |
| 41 |
|
| 42 |
# Suggest git series |
| 43 |
if ! git series -h >/dev/null 2>&1; then |
| 44 |
echo ' |
| 45 |
When working on an open source project, multiple revisions of a change are |
| 46 |
common as the change evolves through the code review process. For `git series` |
| 47 |
and usage instructions, see: |
| 48 |
|
| 49 |
https://github.com/git-series/git-series |
| 50 |
' |
| 51 |
fi |