Skip to content

Commit

Permalink
feat: initial version (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
  • Loading branch information
davelosert and gr2m committed Sep 12, 2022
1 parent fb20cae commit cb6dca4
Show file tree
Hide file tree
Showing 24 changed files with 16,882 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
"on":
push:
branches:
- master
- next
- beta
- "*.x"
- debug
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test
"on":
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
test_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 14
- 16
- 18
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@30f0e7dc5aa0e546410a28dc80a10d8114ee873e
with:
node-version: ${{ matrix.node_version }}
cache: npm
- run: npm ci
- run: npm test
test:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- run: exit 1
if: ${{ needs.test_matrix.result != 'success' }}
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/cache@b195c997a41f41d0dab6d9aafe79e437611b78db
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run test:typescript
- run: npm run lint
- run: npm run build
if: ${{ always() }}
25 changes: 25 additions & 0 deletions .github/workflows/update-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Update Prettier
"on":
push:
branches:
- renovate/prettier-*
workflow_dispatch: {}
jobs:
update_prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
cache: npm
node-version: 16
- run: npm ci
- run: npm run lint:fix
- uses: gr2m/create-or-update-pull-request-action@v1.x
env:
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
with:
title: Prettier updated
body: An update to prettier required updates to your code.
branch: ${{ github.ref }}
commit-message: "style: prettier"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage/
node_modules/
pkg/
.vscode
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ By participating in this project you agree to abide by its terms.

Before you create a new Issue:

1. Please make sure there is no [open issue](https://github.com/octokit/plugin-paginate-rest/issues?utf8=%E2%9C%93&q=is%3Aissue) yet.
1. Please make sure there is no [open issue](https://github.com/octokit/plugin-paginate-graphql.js/issues?utf8=%E2%9C%93&q=is%3Aissue) yet.
2. If it is a bug report, include the steps to reproduce the issue and please create a reproducible test case on [runkit.com](https://runkit.com/). Example: https://runkit.com/gr2m/5aa034f1440b420012a6eebf
3. If it is a feature request, please share the motivation for the new feature, what alternatives you tried, and how you would implement it.
4. Please include links to the corresponding github documentation.
Expand All @@ -19,8 +19,8 @@ First, fork the repository.
Setup the repository locally. Replace `<your account name>` with the name of the account you forked to.

```shell
git clone https://github.com/<your account name>/plugin-paginate-rest.js.git
cd plugin-paginate-rest.js
git clone https://github.com/<your account name>/plugin-paginate-graphql.js.git
cd plugin-paginate-graphql.js
npm install
```

Expand All @@ -34,14 +34,14 @@ npm test

- Create a new branch locally.
- Make your changes in that branch to your fork repository
- Submit a pull request from your topic branch to the master branch on the `octokit/plugin-paginate-rest.js` repository.
- Submit a pull request from your topic branch to the master branch on the `octokit/plugin-paginate-graphql.js` repository.
- Be sure to tag any issues your pull request is taking care of / contributing to. Adding "Closes #123" to a pull request description will automatically close the issue once the pull request is merged in.

## Testing a pull request from github repo locally:

You can install `@octokit/plugin-paginate-rest` from each pull request. Replace `[PULL REQUEST NUMBER]`
You can install `@octokit/plugin-paginate-graphql` from each pull request. Replace `[PULL REQUEST NUMBER]`

Once you are done testing, you can revert back to the default module `@octokit/plugin-paginate-rest` from npm with `npm install @octokit/plugin-paginate-rest`
Once you are done testing, you can revert back to the default module `@octokit/plugin-paginate-graphql` from npm with `npm install @octokit/plugin-paginate-graphql`

## Merging the Pull Request & releasing a new version

Expand Down
Loading

0 comments on commit cb6dca4

Please sign in to comment.