Skip to content

build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.9.0 #70

build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.9.0

build(deps-dev): bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.9.0 #70

Workflow file for this run

name: Pull Request check
on:
pull_request:
types:
- opened
- synchronize
jobs:
say-hi:
continue-on-error: true
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Check for existence of comment
id: comment
run: |
yarn init --yes
yarn add --optional @octokit/[email protected]
node --eval="
(async function() {
const { Octokit } = require('@octokit/rest');
const github = new Octokit({ auth: process.env.GITHUB_TOKEN });
const issueNumber = '${{ github.event.pull_request.number }}';
const owner = '${{ github.repository_owner }}';
const repo = '${{ github.repository }}'.replace(owner + '/', '');
const { data: comments } = await github.issues.listComments({
owner,
repo,
issue_number: issueNumber,
});
console.log(comments.some(comment => comment.body.includes('Hi, ${{ github.actor }}')));
})();
" >> hi.txt
echo "result=$(cat hi.txt | grep -E 'true|false')" >> $GITHUB_OUTPUT
- name: Say hi
uses: jungwinter/comment@v1
if: steps.comment.outputs.result == 'false'
with:
type: create
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
body: |
Hi, ${{ github.actor }}!
Make sure to comply with the [Code of Conduct](https://github.com/${{ github.repository }}/blob/main/CODE_OF_CONDUCT.md), [security policy](https://github.com/${{ github.repository }}/blob/main/SECURITY.md) and [contribution guidelines](https://github.com/${{ github.repository }}/blob/main/CONTRIBUTING.md) before contributing to this repo.
test:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: yarn
- name: Validate package.json
run: yarn validate-package-json
- name: Validate Markdown links
run: yarn check-links
- name: Run ESLint
run: yarn lint
- name: Build code
run: yarn build
- name: Run main test suites
run: yarn test
- name: Report a failed build (if it did fail)
if: failure()
uses: jungwinter/comment@v1
with:
type: create
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
body: |
Hi, @${{ github.event.pull_request.user.login }}! I'm afraid the CI check for #${{ github.event.pull_request.number }} failed! 😭
Don't worry, it'll run again if you commit any changes to this PR. 😉
- name: Label PR as "CI failed" (if CI failed)
if: failure()
uses: actions/labeler@v4
with:
sync-label: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
assign-and-ping:
runs-on: ubuntu-latest
continue-on-error: true
needs: test
permissions:
pull-requests: write
issues: write
steps:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 19.x
- name: Assign pull request to yourself
run: |
yarn init --yes
yarn add --optional @octokit/[email protected]
node --eval="
const { Octokit } = require('@octokit/rest');
const github = new Octokit({ auth: process.env.GITHUB_TOKEN });
(async function() {
await github.issues.addAssignees({
owner: '${{ github.repository_owner }}',
repo: '${{ github.repository }}'.replace('${{ github.repository_owner }}/', ''),
issue_number: ${{ github.event.pull_request.number }},
assignees: ['${{ github.repository_owner }}'],
});
})();
"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Request code review
run: |
yarn init --yes
yarn add --optional @octokit/[email protected]
node --eval="
const { Octokit } = require('@octokit/rest');
const github = new Octokit({ auth: process.env.GITHUB_TOKEN });
(async function() {
await github.pulls.requestReviewers({
owner: '${{ github.repository_owner }}',
repo: '${{ github.repository }}'.replace('${{ github.repository_owner }}/', ''),
pull_number: ${{ github.event.pull_request.number }},
reviewers: ['${{ github.repository_owner }}'],
});
})();
"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}