Skip to content

Commit e0711a0

Browse files
authored
Inject CoC edit warning before submitting PRs (#286)
1 parent 3d30920 commit e0711a0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--
2+
**********************************************************************
3+
*** DO NOT MODIFY THIS FILE DIRECTLY ***
4+
**********************************************************************
5+
The original copy of this file is in the beeware/.github repository.
6+
It will be automatically copied into other BeeWare repositories when
7+
the original is altered. Any changes should be made to the original.
8+
**********************************************************************
9+
-->

.github/workflows/coc-update.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ jobs:
7979
echo "Replacing Code of Conduct..."
8080
cp ../sourcerepo/CODE_OF_CONDUCT.md .
8181
82+
# Prepend the edit warning to the file
83+
WARNING_TEXT=$(< ../sourcerepo/.github/workflows/coc-edit-warning.txt)
84+
printf '%s\n\n' "$WARNING_TEXT" | sed -i '0r /dev/stdin' CODE_OF_CONDUCT.md
85+
8286
# Commit and push the update
8387
echo "Syncing updates to remote..."
8488
git add CODE_OF_CONDUCT.md

0 commit comments

Comments
 (0)