This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🅷🅸 :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## <nome do repositório> | |
This Action auto assign pull requests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull-request | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
assign: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: <usuário do github>/<nome do repositório>@v1 | |
# Exemplo: delivery-much/actions-assigner@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run package | |
git add action.yml README.md src/index.js src/github.js package.json .gitignore | |
git commit -m "Add Action files" | |
git push origin master | |
git tag v1 | |
git push origin v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"package": "ncc build src/index.js -o dist" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { context, getOctokit } = require('@actions/github') | |
/** | |
* Creates Octokit instance and assign. | |
* | |
* @param {string} token - GitHub token | |
*/ | |
const handle = async (token) => { | |
if (context.eventName === 'pull_request') { | |
const octokit = getOctokit(token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { getInput, setFailed } = require('@actions/core') | |
const { handle } = require('./github') | |
// Run Action. | |
const run = async () => { | |
try { | |
const token = getInput('token', { required: true }) | |
await handle(token) | |
} catch (error) { | |
setFailed(error.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Auto assign PRs' | |
description: 'Auto assign pull requests' | |
author: '<seu usuário>' | |
# Exemplo: author: 'delivery-much' | |
branding: | |
icon: 'code' | |
color: 'yellow' | |
inputs: | |
token: | |
description: 'GitHub token' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \ | |
\__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__ | |
__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ | |
\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \ | |
\__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__ | |
__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ | |
\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \ | |
\__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__ | |
__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ | |
\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \ |
NewerOlder