Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Nov 8, 2019
0 parents commit a49b41b
Show file tree
Hide file tree
Showing 12,584 changed files with 1,151,249 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,10 @@
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: juliangruber/approve-pull-request-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: 1
24 changes: 24 additions & 0 deletions README.md
@@ -0,0 +1,24 @@
# find-pull-request-action

A GitHub Action for finding pull requests.

## Usage

```yaml
steps:
- uses: juliangruber/find-pull-request-action@master
id: find-pull-request
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: my-branch-name
- run: echo "Your Pull Request has number ${number}"
if: success() && steps.find-pull-request.outputs.number
env:
number: ${{ steps.find-pull-request.outputs.number }}
```

Currently this will find a single open PR based on given `branch` input. For more options please open an issue.

## License

MIT
16 changes: 16 additions & 0 deletions action.yml
@@ -0,0 +1,16 @@
name: Approve Pull Request
author: juliangruber
description: 'A GitHub Action for approving pull requests'
branding:
icon: 'git-pull-request'
color: green
inputs:
github-token:
description: 'GitHub Token'
required: true
number:
description: 'Pull Request number'
required: true
runs:
using: 'node12'
main: 'index.js'
19 changes: 19 additions & 0 deletions index.js
@@ -0,0 +1,19 @@
'use strict'

const core = require('@actions/core')
const { GitHub, context } = require('@actions/github')

const main = async () => {
const token = core.getInput('github-token')
const number = core.getInput('number')

const octokit = new GitHub(token)

await octokit.pulls.createReview({
...context.repo,
pull_number: number,
event: 'APPROVE'
})
}

main().catch(err => core.setFailed(err.message))
1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lint-staged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/loose-envify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mkdirp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettier-standard

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettierx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/standard

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/@actions/core/lib/command.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions node_modules/@actions/core/lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/@actions/core/lib/command.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a49b41b

Please sign in to comment.