forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update boilerplate code (flyteorg#160)
Signed-off-by: Samhita Alla <[email protected]>
- Loading branch information
1 parent
d998874
commit da10954
Showing
6 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Comment to be posted on PRs from first-time contributors in your repository | ||
newPRWelcomeComment: > | ||
Thank you for opening this pull request! 🙌 | ||
These tips will help get your PR across the finish line: | ||
- Most of the repos have a PR template; if not, fill it out to the best of your knowledge. | ||
- Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). | ||
# Comment to be posted to on pull requests merged by a first time user | ||
firstPRMergeComment: > | ||
Congrats on merging your first pull request! 🎉 | ||
# Comment to be posted on first-time issues | ||
newIssueWelcomeComment: > | ||
Thank you for opening your first issue here! 🛠 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Config File -- Welcome Bot | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Provides a ``config.yml`` file. | ||
|
||
**To Enable:** | ||
|
||
Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Comment to be posted on PRs from first-time contributors in your repository | ||
newPRWelcomeComment: > | ||
Thank you for opening this pull request! 🙌 | ||
These tips will help get your PR across the finish line: | ||
- Most of the repos have a PR template; if not, fill it out to the best of your knowledge. | ||
- Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). | ||
# Comment to be posted to on pull requests merged by a first time user | ||
firstPRMergeComment: > | ||
Congrats on merging your first pull request! 🎉 | ||
# Comment to be posted on first-time issues | ||
newIssueWelcomeComment: > | ||
Thank you for opening your first issue here! 🛠 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
# Clone the config.yml file | ||
echo " - copying ${DIR}/config.yml to the root directory." | ||
cp ${DIR}/config.yml ${DIR}/../../.github/config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lyft/docker_build | ||
lyft/pull_request_template | ||
flyte/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,15 +10,17 @@ set -e | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
OUT="$(mktemp -d)" | ||
git clone [email protected]:lyft/boilerplate.git "${OUT}" | ||
trap "rm -fr $OUT" EXIT | ||
|
||
git clone [email protected]:flyteorg/boilerplate.git "${OUT}" | ||
|
||
echo "Updating the update.sh script." | ||
cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" | ||
echo "" | ||
|
||
|
||
CONFIG_FILE="${DIR}/update.cfg" | ||
README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" | ||
README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" | ||
|
||
if [ ! -f "$CONFIG_FILE" ]; then | ||
echo "$CONFIG_FILE not found." | ||
|
@@ -33,13 +35,34 @@ if [ -z "$REPOSITORY" ]; then | |
exit 1 | ||
fi | ||
|
||
while read directory; do | ||
# TODO: Skip empty lines, whitespace only lines, and comment lines | ||
while read directory junk; do | ||
# Skip comment lines (which can have leading whitespace) | ||
if [[ "$directory" == '#'* ]]; then | ||
continue | ||
fi | ||
# Skip blank or whitespace-only lines | ||
if [[ "$directory" == "" ]]; then | ||
continue | ||
fi | ||
# Lines like | ||
# valid/path other_junk | ||
# are not acceptable, unless `other_junk` is a comment | ||
if [[ "$junk" != "" ]] && [[ "$junk" != '#'* ]]; then | ||
echo "Invalid config! Only one directory is allowed per line. Found '$junk'" | ||
exit 1 | ||
fi | ||
|
||
dir_path="${OUT}/boilerplate/${directory}" | ||
# Make sure the directory exists | ||
if ! [[ -d "$dir_path" ]]; then | ||
echo "Invalid boilerplate directory: '$directory'" | ||
exit 1 | ||
fi | ||
|
||
echo "***********************************************************************************" | ||
echo "$directory is configured in update.cfg." | ||
echo "-----------------------------------------------------------------------------------" | ||
echo "syncing files from source." | ||
dir_path="${OUT}/boilerplate/${directory}" | ||
rm -rf "${DIR}/${directory}" | ||
mkdir -p $(dirname "${DIR}/${directory}") | ||
cp -r "$dir_path" "${DIR}/${directory}" | ||
|
@@ -49,6 +72,4 @@ while read directory; do | |
fi | ||
echo "***********************************************************************************" | ||
echo "" | ||
done < "$CONFIG_FILE" | ||
|
||
rm -rf "${OUT}" | ||
done < "$CONFIG_FILE" |