[Backward] Fix typo #833
Workflow file for this run
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
name: Post - Github activity (PRs) | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- review_requested | |
- closed | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository_owner == 'sofa-framework' }} | |
env: | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_MAIN_WEBHOOK_URL }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install pip packages | |
run: | | |
pip install python-graphql-client | |
pip install python-dateutil | |
pip install requests | |
working-directory: ${{ github.workspace }} | |
# PR opened | |
- name: Run script post-discord-message.py for PR opened | |
if: ${{ github.event.action == 'opened' }} | |
run: | | |
python scripts/discord/post-discord-message.py | |
working-directory: ${{ github.workspace }} | |
env: | |
MESSAGE: ":new: PR opened: [#${{github.event.pull_request.number}} ${{github.event.pull_request.title}}](https://github.com/sofa-framework/sofa/pull/${{github.event.pull_request.number}})" | |
BOT_NAME: "SOFA Github bot" | |
EMBEDS_TITLE: "#${{github.event.pull_request.number}} ${{github.event.pull_request.title}}" | |
EMBEDS_URL: "https://github.com/sofa-framework/sofa/pull/${{github.event.pull_request.number}}" | |
EMBEDS_DESCRIPTION: "Authored by @${{github.event.pull_request.user.login}}\nLabels: ${{ join(github.event.pull_request.labels.*.name, ', ') }}" | |
# PR merged | |
- name: Run script post-discord-message.py for PR merged | |
if: ${{ github.event.action == 'closed' && github.event.pull_request.merged == true }} | |
run: | | |
python scripts/discord/post-discord-message.py | |
working-directory: ${{ github.workspace }} | |
env: | |
MESSAGE: ":raised_hands: Thanks [@${{github.event.pull_request.merged_by.login}}](https://github.com/${{github.event.pull_request.merged_by.login}}) for merging PR [#${{github.event.pull_request.number}} ${{github.event.pull_request.title}}](https://github.com/sofa-framework/sofa/pull/${{github.event.pull_request.number}}) authored by @${{github.event.pull_request.user.login}}" | |
BOT_NAME: "SOFA Github bot" | |
EMBEDS_TITLE: "" | |
EMBEDS_URL: "" | |
EMBEDS_DESCRIPTION: "" | |
# PR review requested event | |
- name: Run script post-discord-message.py for PR review request | |
if: ${{ github.event.action == 'review_requested' }} | |
run: | | |
python scripts/discord/post-discord-message.py | |
working-directory: ${{ github.workspace }} | |
env: | |
MESSAGE: ":eyeglasses: Review requested: ${{ join(github.event.pull_request.requested_reviewers.*.login, ', ') }} would you please review [#${{github.event.pull_request.number}}](https://github.com/sofa-framework/sofa/pull/${{github.event.pull_request.number}})?" | |
BOT_NAME: "SOFA Github bot" | |
EMBEDS_TITLE: "" | |
EMBEDS_URL: "" | |
EMBEDS_DESCRIPTION: "" |