Skip to content
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
41 changes: 41 additions & 0 deletions .github/workflows/notify-pr-closed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Notify Teams on PR

on:
pull_request:
types: [closed]

jobs:
notify-teams:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute added/removed lines for notification
id: diff
run: |
PR_DATA=$(gh pr view "${{ github.event.pull_request.number }}" --json additions,deletions -q '.')
ADDITIONS=$(echo "$PR_DATA" | jq '.additions')
DELETIONS=$(echo "$PR_DATA" | jq '.deletions')
echo "additions=$ADDITIONS" >> $GITHUB_OUTPUT
echo "deletions=$DELETIONS" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Microsoft Teams
uses: softwareone-platform/notify-pr-teams-action@v4
with:
webhook_url: ${{ secrets.TEAMS_WEBHOOK_URL }}
bot_image_url: https://raw.githubusercontent.com/softwareone-platform/requela/main/.github/workflows/assets/turing_team_pr_bot.png
repo: ${{ github.repository }}
pr_url: ${{ github.event.pull_request.html_url }}
pr_title: ${{ github.event.pull_request.title }}
pr_author: ${{ github.event.pull_request.user.login }}
head_ref: ${{ github.event.pull_request.head.ref }}
base_ref: ${{ github.event.pull_request.base.ref }}
commits: ${{ github.event.pull_request.commits }}
changed_files: ${{ github.event.pull_request.changed_files }}
additions: ${{ steps.diff.outputs.additions }}
deletions: ${{ steps.diff.outputs.deletions }}
pr_number: ${{ github.event.pull_request.number }}
pr_status: ${{ github.event.pull_request.state }}
is_merged: ${{ github.event.pull_request.merged }}
31 changes: 31 additions & 0 deletions .github/workflows/pr-build-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,37 @@ jobs:
- name: Run tests
run: uv run pytest

- name: Compute added/removed lines for notification
if: ${{ github.event_name == 'pull_request' }}
id: diff
run: |
PR_DATA=$(gh pr view "${{ github.event.pull_request.number }}" --json additions,deletions -q '.')
ADDITIONS=$(echo "$PR_DATA" | jq '.additions')
DELETIONS=$(echo "$PR_DATA" | jq '.deletions')
echo "additions=$ADDITIONS" >> $GITHUB_OUTPUT
echo "deletions=$DELETIONS" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Microsoft Teams
if: ${{ github.event_name == 'pull_request' }}
uses: softwareone-platform/notify-pr-teams-action@v4
with:
webhook_url: ${{ secrets.TEAMS_WEBHOOK_URL }}
bot_image_url: https://raw.githubusercontent.com/softwareone-platform/requela/main/.github/workflows/assets/turing_team_pr_bot.png
repo: ${{ github.repository }}
pr_url: ${{ github.event.pull_request.html_url }}
pr_title: ${{ github.event.pull_request.title }}
pr_author: ${{ github.event.pull_request.user.login }}
head_ref: ${{ github.event.pull_request.head.ref }}
base_ref: ${{ github.event.pull_request.base.ref }}
commits: ${{ github.event.pull_request.commits }}
changed_files: ${{ github.event.pull_request.changed_files }}
additions: ${{ steps.diff.outputs.additions }}
deletions: ${{ steps.diff.outputs.deletions }}
pr_number: ${{ github.event.pull_request.number }}
pr_status: ${{ github.event.pull_request.state }}
is_merged: ${{ github.event.pull_request.merged }}

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v4
env:
Expand Down
Loading