Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v13 #1874

Merged
merged 52 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a6f4474
feat: make probot work with latest octokit deps (#1864)
Uzlopak Oct 29, 2023
5f75d18
fix(docs): remove NodeJS v10 references (#1670)
shaftoe Oct 29, 2023
e5e324d
chore(deps): update dependency semantic-release to v22 (#1857)
renovate[bot] Oct 29, 2023
63d5ee7
chore(deps): update dependency prettier to v3 (#1854)
renovate[bot] Oct 29, 2023
2545a45
style:prettier (#1877)
Uzlopak Nov 9, 2023
4d031c1
build(deps-dev): remove `@tsconfig/node10` (#1884)
Uzlopak Nov 10, 2023
0251f68
fix(deps): -semver (#1893)
Uzlopak Nov 12, 2023
4100b25
ci(security): Set up code scanning (#1882)
AaronDewes Nov 12, 2023
4699a3c
refactor: remove `log` argument from auth.ts to improve test coverage…
Uzlopak Nov 12, 2023
8999768
fix: use `import()` instead of `require` to import `smee-client` (#1889)
Uzlopak Nov 12, 2023
3694baf
chore: avoid require to load package.json (#1890)
Uzlopak Nov 12, 2023
c2b7cb9
refactor: avoid require for `dotenv.config()` (#1894)
Uzlopak Nov 12, 2023
8dde11e
fix: correctly escape `.` in URL regex (#1895)
Uzlopak Nov 12, 2023
c0fb103
chore(ci): add node21 to ci/cd workflow (#1896)
Uzlopak Nov 12, 2023
3219a98
fix: use `readFileSync` and `JSON.parse` instead of `require` in prob…
Uzlopak Nov 13, 2023
753c71b
fix: determine webhook path for `createNodeMiddleware()` via env vari…
Uzlopak Nov 14, 2023
9a9079d
chore(ci): add dependency review and license check for production dep…
Uzlopak Nov 14, 2023
be651aa
feat: Migrate to modern dependencies for v13 (#1821)
AaronDewes Nov 14, 2023
c30d88f
chore: remove undici (#1902)
Uzlopak Nov 14, 2023
c93f21e
refactor: improve typescript (#1904)
Uzlopak Nov 14, 2023
b567692
chore: Clean up code in beta branch (#1900)
AaronDewes Nov 14, 2023
d687a1b
docs: remove brazilian Readme (#1909)
Uzlopak Nov 15, 2023
c101c01
test: 100% probot octokit (#1907)
Uzlopak Nov 15, 2023
ce69708
test: add smee client integration tests (#1908)
Uzlopak Nov 15, 2023
95829fa
test: 100 coverage for views (#1906)
Uzlopak Nov 15, 2023
e37a200
ci: split lint job from test matrix (#1903)
Uzlopak Nov 15, 2023
010b431
docs: replace slack on heroku with gh-discussions (#1910)
Uzlopak Nov 15, 2023
8dc41a9
ci: use redis for ci/cd (#1905)
Uzlopak Nov 15, 2023
ba8118a
Merge branch 'beta' into beta-master
Uzlopak Nov 15, 2023
94ceda8
fix lint
Uzlopak Nov 15, 2023
b710ade
docs: update ToC for docs/extensions.md
prettier-toc-me[bot] Nov 16, 2023
54ca972
fix: linting of beta (#1918)
Uzlopak Nov 16, 2023
1c7a2d3
chore: add example for benchmarks (#1913)
Uzlopak Nov 16, 2023
eaf269a
ci: Speed up CI by skipping build (#1919)
AaronDewes Nov 16, 2023
b0f11ff
ci: cosmetically improve, update and set permissions of/for workflows…
Uzlopak Nov 16, 2023
51ddc81
build(deps): update smee-client v2.0.0 (#1923)
Uzlopak Nov 18, 2023
cba19e2
chore: code cleanup (#1916)
wolfy1339 Nov 18, 2023
122740b
fix: derive `Server` log from `Probot` log (#1924)
wolfy1339 Nov 18, 2023
5116b5e
ci(workflow): fix `test` workflow to assure it is not skipped if depe…
wolfy1339 Nov 19, 2023
f5ee0de
chore: Prepare code for ESM (#1921)
AaronDewes Nov 20, 2023
2854ed4
chore: update deps of beta (#1926)
Uzlopak Nov 21, 2023
a6ffe63
build(lockfile): update `@octokit/oauth-methods` to 4.0.1 (#1927)
wolfy1339 Nov 21, 2023
53e4ae3
fix: lockfile maintenance for beta (#1928)
Uzlopak Nov 22, 2023
14a5f28
chore: add comment to `SimplifiedObject` (#1929)
wolfy1339 Nov 22, 2023
558ec0e
chore: reduce express specific code (#1930)
Uzlopak Nov 25, 2023
9d1fdcd
fix: avoid deep importing from dependency (#1932)
Uzlopak Nov 25, 2023
f515b6a
fix: add node prefix for builtin modules (#1931)
Uzlopak Nov 25, 2023
ce520b0
fix: auth-app expects for options.request an object of type RequestIn…
Uzlopak Dec 4, 2023
16eeecf
chore: add @octokit/request to production deps (#1936)
Uzlopak Dec 4, 2023
4228573
fix(deps): update @octokit/webhooks to v12.0.10 (#1937)
Uzlopak Dec 4, 2023
5e302ce
docs: formatting typo in simulating-webhooks.md (#1942)
ynx0 Jan 4, 2024
e25f1ae
fix: bind log (#1939)
Uzlopak Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: git fetch --depth=20 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ jobs:
strategy:
matrix:
node-version:
- 10
- 12
- 14
- 18
- 20
wolfy1339 marked this conversation as resolved.
Show resolved Hide resolved
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand All @@ -34,11 +33,11 @@ jobs:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 16
node-version: lts/*
- run: npm ci
- run: npm run lint
- run: npm run build
Expand Down
10 changes: 5 additions & 5 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Developing an app

# Developing an app

To develop a Probot app, you will first need a recent version of [Node.js](https://nodejs.org/) installed. Open a terminal and run `node -v` to verify that it is installed and is at least 10.0.0 or later. Otherwise, [install the latest version](https://nodejs.org/).
To develop a Probot app, you will first need a recent version of [Node.js](https://nodejs.org/) installed. Open a terminal and run `node -v` to verify that it is installed and is at least 18.0.0 or later. Otherwise, [install the latest version](https://nodejs.org/).

**Contents:**

Expand All @@ -18,10 +18,10 @@ To develop a Probot app, you will first need a recent version of [Node.js](https
- [Installing the app on a repository](#installing-the-app-on-a-repository)
- [Debugging](#debugging)
- [Run Probot programmatically](#run-probot-programmatically)
- [Use `run`](#use-run)
- [Use `server`](#use-server)
- [Use `createNodeMiddleware`](#use-createnodemiddleware)
- [Use `probot`](#use-probot)
- [Use run](#use-run)
- [Use server](#use-server)
- [Use createNodeMiddleware](#use-createnodemiddleware)
- [Use probot](#use-probot)
- [Use Probot's Octokit](#use-probots-octokit)

<!-- tocstop -->
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = (app) => {
context.octokit.issues.createComment(
context.issue({
body: `There were ${edits} edits to issues in this thread.`,
})
}),
);
});
};
Expand Down
10 changes: 5 additions & 5 deletions docs/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = (app) => {
response.data.issues.forEach((issue) => {
context.log.info("Issue: %s", issue.title);
});
}
},
);
});
};
Expand All @@ -33,7 +33,7 @@ module.exports = (app) => {
const allIssues = await context.octokit.paginate(
context.octokit.issues.list,
context.repo(),
(response) => response.data
(response) => response.data,
);
console.log(allIssues);
});
Expand All @@ -58,22 +58,22 @@ module.exports = (app) => {
break;
}
}
}
},
);
});
};
```

## Async iterators

If your runtime environment supports async iterators (such as Node 10+), you can iterate through each response
Using async iterators you can iterate through each response

```js
module.exports = (app) => {
app.on("issues.opened", async (context) => {
for await (const response of octokit.paginate.iterator(
context.octokit.issues.list,
context.repo()
context.repo(),
)) {
for (const issue of response.data) {
if (issue.body.includes("something")) {
Expand Down