Skip to content

fix: Test PRs

fix: Test PRs #594

Workflow file for this run

name: Check
on:
merge_group:
pull_request:
branches:
- dev
- main
jobs:
run:
name: Check Health
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install
run: npm ci --no-audit
- name: Lerna bootstrap
run: npx lerna bootstrap
- name: Lint
run: |
npm run lint
start:
name: Start merge process
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: Lint
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: One
id: pr_state
uses: actions/github-script@v6
with:
script: |
const teammate = {
Yakutoc: "alex_czech",
'neretin-trike': "aaneretin",
'Yeti-or': "yeti-or",
TitanKuzmich: "aakrivonos",
kayman233: "ivakudryavtsev",
};
const res = await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
});
const { title, user: { login } } = res?.data[0] || {};
return { pr: title, user: teammate[login] || 'alex_czech' };
- name: Create the Mattermost Message
run: |
title=${{ fromJSON(steps.pr_state.outputs.result).pr }}
user=${{ fromJSON(steps.pr_state.outputs.result).user }}
echo "{\"text\":\"$title - In progress\\n@user\"}" > mattermost.json
- name: Send notification
if: ${{ fromJSON(github).event_name == 'merge_group' }}
uses: mattermost/action-mattermost-notify@master
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.WEBHOOKS_NOTIFICATIONS_MM }}