Skip to content

[Snyk] Fix for 1 vulnerabilities #37

[Snyk] Fix for 1 vulnerabilities

[Snyk] Fix for 1 vulnerabilities #37

name: Report connectors dependency
on:
pull_request:
jobs:
report-affected-connectors:
name: "Report affected connectors"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Extract git-diff changed files
run: |
git diff --name-only remotes/origin/master...HEAD -- airbyte-integrations/ > ./changed_files.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Create dependency report
id: dependency_report
run: |
python ./tools/bin/ci_check_dependency.py ./changed_files.txt
if [[ -f comment_body.md ]]; then
echo "comment=true" >> $GITHUB_OUTPUT
fi
- name: Find existing comment for connector dependencies
# Always run this step because the action may need to
# remove a comment created from a previous commit.
uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "report-connectors-dependency.yml"
- name: Comment report in PR
if: steps.dependency_report.outputs.comment == 'true'
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: "replace"
body-file: "comment_body.md"
- name: Remove deprecated report in PR
if: steps.dependency_report.outputs.comment != 'true' && steps.find_comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: "replace"
body: |
<!--- this comment is for `report-connectors-dependency.yml` identification, do not remove -->
## Affected Connector Report
The latest commit has removed all connector-related changes. There are no more dependent connectors for this PR.