Skip to content

Commit

Permalink
🤖 lazy commit
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Sep 18, 2023
1 parent b01344b commit 841fb64
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Nissuer
uses: balazsorban44/[email protected].0
uses: balazsorban44/[email protected].1
with:
label-area-section: "Which area(s) are affected?(.*)"
label-area-section: "Which area\\(s\\) are affected\\?(.*)"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Nissuer
uses: balazsorban44/[email protected].0
uses: balazsorban44/[email protected].1
```

Add a comment file (by default we look for `.github/invalid-reproduction.md`):
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ debug(`Config: ${JSON.stringify(config, null, 2)}`)
async function checkValidReproduction() {
const { issue, action } = context.payload

if (action !== "opened") return

if (!issue?.body) return info("Could not get issue body, exiting")
if (action !== "opened" || !issue?.body) return

if (await isValidReproduction(issue.body))
return info(`Issue #${issue.number} contains a valid reproduction 💚`)
Expand Down Expand Up @@ -227,13 +225,12 @@ async function hideUnhelpfulComments() {

/* This action will automatically add labels to issues based on the area(s) of Next.js that are affected. */
async function autolabelArea() {
if (!config.labels.areaSection)
return info("No area section defined, exiting")
const { issue } = context.payload
if (!issue) return info("Not an issue, exiting")
const { action, issue } = context.payload
if (action !== "opened" || !issue?.body) return

if (!config.labels.areaSection) return debug("No area section defined")

const { body, number: issue_number } = issue
if (!body) return info("Could not get issue body, exiting")

const { rest: client } = getOctokit(config.token)

Expand Down

0 comments on commit 841fb64

Please sign in to comment.