Skip to content

Feature: trend micro vision email (341) #2090

Feature: trend micro vision email (341)

Feature: trend micro vision email (341) #2090

Workflow file for this run

name: Show Smart Descriptions
on:
pull_request:
branches: [main]
workflow_dispatch:
defaults:
run:
working-directory: utils
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v3
id: setup-python
with:
python-version: "3.10"
- name: Install Poetry
run: |
pip install poetry
poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
poetry install --only main
- name: Generate smart descriptinos
id: smartdesc
run: |
echo 'SMART_DESC_RESULT<<EOF' >> $GITHUB_OUTPUT
poetry run python show_smart_descriptions.py --changes --prsha=$GITHUB_SHA >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2.4.0
id: fc
with:
issue-number: ${{ github.event.number }}
comment-author: "github-actions[bot]"
body-includes: "Smart descriptions generated from the latest tests"
- name: Get current date
id: date
run: echo "date=$(date +'%F %H:%M:%S')" >> $GITHUB_OUTPUT
- name: Add/Update Comment
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
Smart descriptions generated from the latest tests at ${{ steps.date.outputs.date }}:
${{ steps.smartdesc.outputs.SMART_DESC_RESULT }}