Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add derivative warning action #98

Merged
merged 1 commit into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create_db_derivatives.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and commit category, images and extended database files
name: Create derivative databases

on:
push:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/post_derivative_warning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Post derivative warning

on:
pull_request:
paths:
- "*.csv"
- "!plane-alert-db.csv"
- "!plane-alert-pia.csv"
- "!plane-alert-twitter-blocked.csv"
- "!plane-alert-ukraine.csv"

jobs:
postDerivativeWarning:
runs-on: ubuntu-latest
name: Post a warning pull request comment when a user changes a derivative file
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Retrieve warning message from READ_BEFORE_MAKING_CHANGES.md
run: |
echo "WARNING_MSG<<EOF" >> $GITHUB_ENV
echo "$(cat READ_BEFORE_MAKING_CHANGES.md | tail -n +3)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Post derivative warning
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ env.WARNING_MSG }}
comment_tag: execution
2 changes: 1 addition & 1 deletion READ_BEFORE_MAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Please only suggest/make any changes to the following files:

- [plane-alert-db.csv](plane-alert-db.csv): This is the main database file. All non-image changes should be done here.
- [plane-alert-twitter-blocked.csv](plane-alert-twitter-blocked.txt): This source file contains planes that will cause your Twitter account to be banned. Please use it with care.
- [plane-alert-pia.csv](plane-alert-pia.csv): This list contains PIA planes.
- [plane-alert-twitter-blocked.csv](plane-alert-twitter-blocked.txt): This source file contains planes that will cause your Twitter account to be banned. Please use it with care.
- [plane-alert-ukraine.csv](plane-alert-ukraine.csv): This list contains Ukrainian planes.
- [plane_images.txt](plane_images.txt): You can add plane images in this source file.

Expand Down