Skip to content

Commit a49b41b

Browse files
committed
initial commit
0 parents  commit a49b41b

File tree

12,584 files changed

+1151249
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,584 files changed

+1151249
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: juliangruber/approve-pull-request-action@master
8+
with:
9+
github-token: ${{ secrets.GITHUB_TOKEN }}
10+
number: 1

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# find-pull-request-action
2+
3+
A GitHub Action for finding pull requests.
4+
5+
## Usage
6+
7+
```yaml
8+
steps:
9+
- uses: juliangruber/find-pull-request-action@master
10+
id: find-pull-request
11+
with:
12+
github-token: ${{ secrets.GITHUB_TOKEN }}
13+
branch: my-branch-name
14+
- run: echo "Your Pull Request has number ${number}"
15+
if: success() && steps.find-pull-request.outputs.number
16+
env:
17+
number: ${{ steps.find-pull-request.outputs.number }}
18+
```
19+
20+
Currently this will find a single open PR based on given `branch` input. For more options please open an issue.
21+
22+
## License
23+
24+
MIT

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Approve Pull Request
2+
author: juliangruber
3+
description: 'A GitHub Action for approving pull requests'
4+
branding:
5+
icon: 'git-pull-request'
6+
color: green
7+
inputs:
8+
github-token:
9+
description: 'GitHub Token'
10+
required: true
11+
number:
12+
description: 'Pull Request number'
13+
required: true
14+
runs:
15+
using: 'node12'
16+
main: 'index.js'

index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use strict'
2+
3+
const core = require('@actions/core')
4+
const { GitHub, context } = require('@actions/github')
5+
6+
const main = async () => {
7+
const token = core.getInput('github-token')
8+
const number = core.getInput('number')
9+
10+
const octokit = new GitHub(token)
11+
12+
await octokit.pulls.createReview({
13+
...context.repo,
14+
pull_number: number,
15+
event: 'APPROVE'
16+
})
17+
}
18+
19+
main().catch(err => core.setFailed(err.message))

node_modules/.bin/acorn

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/eslint

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esparse

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/esvalidate

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/js-yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/lint-staged

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)