Skip to content

Commit

Permalink
Merge pull request #6 from planningcenter/™/bump-for-dist
Browse files Browse the repository at this point in the history
chore(Build): Branch bump for new dist
  • Loading branch information
tannermares committed May 22, 2024
2 parents 6ee191e + 744496f commit e99d910
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 70 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Pull Assign"
description: "a Github action to aassign a PR to the author"
description: "a Github action to assign a PR to the author"
inputs:
github_token:
description: A GitHub token.
Expand Down
20 changes: 10 additions & 10 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9691,9 +9691,7 @@ const run = async () => {
try {
const githubToken = core.getInput('github_token')

if (!githubToken) {
throw Error(`input 'github_token' is required`)
}
if (!githubToken) throw Error(`input 'github_token' is required`)

const client = github.getOctokit(githubToken)
const owner = github.context.payload.repository.owner.login
Expand All @@ -9704,13 +9702,14 @@ const run = async () => {
const assignees = pr.assignees
const author = pr.user

if (!assignees || assignees.length === 0) {
await client.request(`POST /repos/${owner}/${repo}/issues/${issue_number}/assignees`, {
owner,
repo,
issue_number,
assignees: [author.login]
})
if (
(!assignees || assignees.length === 0) &&
author.login !== 'dependabot[bot]'
) {
await client.request(
`POST /repos/${owner}/${repo}/issues/${issue_number}/assignees`,
{ owner, repo, issue_number, assignees: [author.login] }
)
}
} catch (error) {
console.log('Error:', error)
Expand All @@ -9720,6 +9719,7 @@ const run = async () => {
}

run()

})();

module.exports = __webpack_exports__;
Expand Down
133 changes: 86 additions & 47 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "pull-assign-action",
"version": "1.0.0",
"description": "a Github action to aassign a PR to the author",
"main": "dist/action.js",
"description": "a Github action to assign a PR to the author",
"main": "src/action.js",
"scripts": {
"build": "ncc build src/action.js -o dist",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
Loading

0 comments on commit e99d910

Please sign in to comment.