Skip to content

Commit

Permalink
feat: v13 (#1874)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Drop support for NodeJS < 18
BREAKING CHANGE: replace node-fetch with the Fetch API
BREAKING CHANGE: default webhookPath is now /api/github/webhooks
BREAKING CHANGE: probot receive now only supports payloads in JSON format, previously also (unintionally) allowed JS.

closes #1643


---------

Co-authored-by: Aras Abbasi <aras.abbasi@googlemail.com>
Co-authored-by: Alexander Fortin <shaftoe@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aaron Dewes <aaron.dewes@protonmail.com>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: Aaron Dewes <aaron@runcitadel.space>
Co-authored-by: prettier-toc-me[bot] <56236715+prettier-toc-me[bot]@users.noreply.github.com>
Co-authored-by: Yaseen <9275716+ynx0@users.noreply.github.com>
  • Loading branch information
9 people committed Jan 25, 2024
1 parent 02d81f8 commit 948a1b7
Show file tree
Hide file tree
Showing 91 changed files with 10,691 additions and 20,903 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
@@ -0,0 +1,42 @@
name: "CodeQL"

on:
push:
branches: [ "master", "*.x", "beta", "next" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "beta" ]
schedule:
- cron: '24 7 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
18 changes: 11 additions & 7 deletions .github/workflows/docs.yml
@@ -1,5 +1,5 @@
name: Docs
"on":
on:
push:
branches:
- master
Expand All @@ -8,14 +8,18 @@ jobs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v4
- run: git fetch --depth=20 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build
- run: ./script/publish-docs
- name: Install dependencies
run: npm ci
- name: Build probot
run: npm run build
- name: Publish documentation
run: ./script/publish-docs
env:
OCTOKITBOT_PAT: ${{ secrets.OCTOKITBOT_PAT }}
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
@@ -1,5 +1,5 @@
name: Release
"on":
on:
push:
branches:
- master
Expand All @@ -11,14 +11,19 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Check out repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build
- run: npx semantic-release
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
135 changes: 116 additions & 19 deletions .github/workflows/test.yml
@@ -1,49 +1,146 @@
name: Test
"on":
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

permissions:
contents: read

jobs:
test_matrix:
dependency-review:
name: Dependency Review
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Dependency review
uses: actions/dependency-review-action@v3

license-check:
name: Check Licenses
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check Licenses
run: npx license-checker --production --summary --onlyAllow="0BSD;Apache-2.0;Apache 2.0;Python-2.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT"

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint

test-unit:
name: Test on Node ${{ matrix.node-version }} and ${{ matrix.os }}
strategy:
matrix:
node-version:
- 10
- 12
- 14
- 18
- 20
- 21
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- run: npx jest
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test

test-redis:
name: Test on Node LTS and Redis 7
runs-on: ubuntu-latest
services:
redis:
image: 'redis:7'
ports:
- '6379:6379'
options: '--entrypoint redis-server'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: Install Dependencies
run: npm ci
- name: Test
run: npm run test
env:
REDIS_HOST: 127.0.0.1

test:
runs-on: ubuntu-latest
needs: test_matrix
needs:
- test-unit
- test-redis

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: exit 1
if: ${{ needs.test-unit.result != 'success' || needs.test-redis.result != 'success' }}
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
node-version: 16
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npx jest
- name: codecov
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test:coverage
- name: Update Codecov
run: npx codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ always() }}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -44,7 +44,7 @@ Probot is built by people just like you! Most of the interesting things are buil

If you're interested in contributing to Probot itself, check out our [contributing docs](CONTRIBUTING.md) to get started.

Want to chat with Probot users and contributors? [Join us in Slack](https://probot-slackin.herokuapp.com/)!
Want to discuss with Probot users and contributors? [Discuss on GitHub](https://github.com/probot/probot/discussions)!

## Ideas

Expand Down
40 changes: 0 additions & 40 deletions README.pt-br.md

This file was deleted.

0 comments on commit 948a1b7

Please sign in to comment.