From e1186b4a1ed5f8bc2f3bb199b9a83e4567f82737 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Wed, 17 Apr 2024 01:01:58 -0400 Subject: [PATCH 01/15] Rename Inline to SingleLine --- shared/naturalcrit/markdown.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 8018bf63b..c2c0710dd 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -294,8 +294,8 @@ const superSubScripts = { } }; -const definitionListsInline = { - name : 'definitionListsInline', +const definitionListsSingleLine = { + name : 'definitionListsSingleLine', level : 'block', start(src) { return src.match(/^[^\n]*?::[^\n]*/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { @@ -312,7 +312,7 @@ const definitionListsInline = { } if(definitions.length) { return { - type : 'definitionListsInline', + type : 'definitionListsSingleLine', raw : src.slice(0, endIndex), definitions }; @@ -326,8 +326,8 @@ const definitionListsInline = { } }; -const definitionListsMultiline = { - name : 'definitionListsMultiline', +const definitionListsMultiLine = { + name : 'definitionListsMultiLine', level : 'block', start(src) { return src.match(/^[^\n]*\n::/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { @@ -353,7 +353,7 @@ const definitionListsMultiline = { } if(definitions.length) { return { - type : 'definitionListsMultiline', + type : 'definitionListsMultiLine', raw : src.slice(0, endIndex), definitions }; @@ -617,7 +617,7 @@ function MarkedVariables() { //^=====--------------------< Variable Handling >-------------------=====^// Marked.use(MarkedVariables()); -Marked.use({ extensions: [definitionListsMultiline, definitionListsInline, superSubScripts, mustacheSpans, mustacheDivs, mustacheInjectInline] }); +Marked.use({ extensions: [definitionListsMultiLine, definitionListsSingleLine, superSubScripts, mustacheSpans, mustacheDivs, mustacheInjectInline] }); Marked.use(mustacheInjectBlock); Marked.use({ renderer: renderer, tokenizer: tokenizer, mangle: false }); Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite()); From 68a68bde829f33039c298cc63329d66db0899ece Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Wed, 17 Apr 2024 01:03:25 -0400 Subject: [PATCH 02/15] Only check for DLs at start of line Previous "start" regex used `^` instead of `\n`, which meant if the first character in a line failed to start a match, it would check for the start of a DL in *every* character in the line, which slows things down a lot. --- shared/naturalcrit/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index c2c0710dd..f72955bf3 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -297,7 +297,7 @@ const superSubScripts = { const definitionListsSingleLine = { name : 'definitionListsSingleLine', level : 'block', - start(src) { return src.match(/^[^\n]*?::[^\n]*/m)?.index; }, // Hint to Marked.js to stop and check for a match + start(src) { return src.match(/\n[^\n]*?::[^\n]*/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym; let match; @@ -329,7 +329,7 @@ const definitionListsSingleLine = { const definitionListsMultiLine = { name : 'definitionListsMultiLine', level : 'block', - start(src) { return src.match(/^[^\n]*\n::/m)?.index; }, // Hint to Marked.js to stop and check for a match + start(src) { return src.match(/\n[^\n]*\n::/m)?.index; }, // Hint to Marked.js to stop and check for a match tokenizer(src, tokens) { const regex = /(\n?\n?(?!::)[^\n]+?(?=\n::))|\n::(.(?:.|\n)*?(?=(?:\n::)|(?:\n\n)|$))/y; let match; From 709c9ece7459860a221d1d5b5922686c7ee12f32 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 18 Apr 2024 16:20:09 -0400 Subject: [PATCH 03/15] Change to camelCase --- themes/V3/5ePHB/style.less | 2 +- themes/V3/Blank/style.less | 2 +- themes/fonts/icon fonts/dicefont.less | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 37327fb19..25b784cfc 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -1,6 +1,6 @@ @import (less) './themes/assets/assets.less'; @import (less) './themes/fonts/icon fonts/font-icons.less'; -@import (less) './themes/fonts/icon fonts/dicefont.less'; +@import (less) './themes/fonts/icon fonts/diceFont.less'; :root { //Colors diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 1d8ca6ee4..ec8905630 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -1,6 +1,6 @@ @import (less) './themes/fonts/5e/fonts.less'; @import (less) './themes/assets/assets.less'; -@import (less) './themes/fonts/icon fonts/dicefont.less'; +@import (less) './themes/fonts/icon fonts/diceFont.less'; :root { //Colors diff --git a/themes/fonts/icon fonts/dicefont.less b/themes/fonts/icon fonts/dicefont.less index 78a88f03a..069f6f769 100644 --- a/themes/fonts/icon fonts/dicefont.less +++ b/themes/fonts/icon fonts/dicefont.less @@ -1,9 +1,9 @@ -/* Icon Font: dicefont */ +/* Icon Font: diceFont */ @font-face { font-family : 'DiceFont'; font-style : normal; font-weight : normal; - src : url('../../../fonts/icon fonts/dicefont.woff2'); + src : url('../../../fonts/icon fonts/diceFont.woff2'); } .df { From 1018ba554f20a872a97e4fdb9699e2bec6bd71b3 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 18 Apr 2024 16:42:06 -0400 Subject: [PATCH 04/15] rename files to camelCase --- .../icon fonts/{dicefont.less => diceFont.less} | 0 .../icon fonts/{dicefont.woff2 => diceFont.woff2} | Bin .../{dicefont_license.md => diceFont_license.md} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename themes/fonts/icon fonts/{dicefont.less => diceFont.less} (100%) rename themes/fonts/icon fonts/{dicefont.woff2 => diceFont.woff2} (100%) rename themes/fonts/icon fonts/{dicefont_license.md => diceFont_license.md} (100%) diff --git a/themes/fonts/icon fonts/dicefont.less b/themes/fonts/icon fonts/diceFont.less similarity index 100% rename from themes/fonts/icon fonts/dicefont.less rename to themes/fonts/icon fonts/diceFont.less diff --git a/themes/fonts/icon fonts/dicefont.woff2 b/themes/fonts/icon fonts/diceFont.woff2 similarity index 100% rename from themes/fonts/icon fonts/dicefont.woff2 rename to themes/fonts/icon fonts/diceFont.woff2 diff --git a/themes/fonts/icon fonts/dicefont_license.md b/themes/fonts/icon fonts/diceFont_license.md similarity index 100% rename from themes/fonts/icon fonts/dicefont_license.md rename to themes/fonts/icon fonts/diceFont_license.md From fc539899467509f5ae0a37c6fc430b28ac133c36 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 10:47:00 -0400 Subject: [PATCH 05/15] Create pr-check.yml For users with many open PRs, creates a warning message in the PR description when opening a new PR, encouraging users to complete existing PRs before opening new ones. --- .github/workflows/pr-check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 000000000..951fd02c1 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,26 @@ +name: PR Check + +on: + pull_request: + types: + - opened + +jobs: + check-pr: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get PR count + id: pr-count + run: | + PR_COUNT=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/naturalcrit/homebrewery/pulls? state=open&head=${{ github.actor }}:${{ github.head_ref }}" | jq '. | length') + echo "::set-output name=pr_count::$PR_COUNT" + + - name: Update PR description + if: ${{ steps.pr_count.outputs.pr_count }} -ge 1 + run: | + gh pr edit ${{ github.event.number }} --body "You already have ${{ steps.pr-count.outputs.pr_count }} PRs open. Consider completing some of your existing PRs before opening new ones." From 228041913ee02ef1af795d206e373bfdf7261b7d Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:15:27 -0400 Subject: [PATCH 06/15] Create limit-pull-requests.yml --- .github/workflows/limit-pull-requests.yml | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/limit-pull-requests.yml diff --git a/.github/workflows/limit-pull-requests.yml b/.github/workflows/limit-pull-requests.yml new file mode 100644 index 000000000..413fa0624 --- /dev/null +++ b/.github/workflows/limit-pull-requests.yml @@ -0,0 +1,103 @@ +name: Limit pull requests +description: > + Limit the number of open pull requests to the repository created by a user +author: ZhongRuoyu (from Homebrew repository) +branding: + icon: alert-triangle + color: yellow + +inputs: + token: + description: GitHub token + required: false + default: ${{ github.token }} + except-users: + description: The users exempted from the limit, one per line + required: false + # https://docs.github.com/en/graphql/reference/enums#commentauthorassociation + except-author-associations: + description: The author associations exempted from the limit, one per line + required: false + comment-limit: + description: > + Post the comment when the user's number of open pull requests exceeds this + number and `comment` is not empty + required: true + default: "10" + comment: + description: The comment to post when the limit is reached + required: false + close-limit: + description: > + Close the pull request when the user's number of open pull requests + exceeds this number and `close` is set to `true` + required: true + default: "50" + close: + description: Whether to close the pull request when the limit is reached + required: true + default: "false" + +runs: + using: composite + steps: + - name: Check the number of pull requests + id: count-pull-requests + run: | + # If the user is exempted, assume they have no pull requests. + if grep -Fiqx '${{ github.actor }}' <<<"$EXCEPT_USERS"; then + echo "::notice::@${{ github.actor }} is exempted from the limit." + echo "count=0" >>"$GITHUB_OUTPUT" + exit 0 + fi + if grep -Fiqx '${{ github.event.pull_request.author_association }}' <<<"$EXCEPT_AUTHOR_ASSOCIATIONS"; then + echo "::notice::@{{ github.actor }} is a ${{ github.event.pull_request.author_association }} exempted from the limit." + echo "count=0" >>"$GITHUB_OUTPUT" + exit 0 + fi + + count="$( + gh api \ + --method GET \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + --field state=open \ + --paginate \ + '/repos/{owner}/{repo}/pulls' | + jq \ + --raw-output \ + --arg USER '${{ github.actor }}' \ + 'map(select(.user.login == $USER)) | length' + )" + echo "::notice::@${{ github.actor }} has $count open pull request(s)." + echo "count=$count" >>"$GITHUB_OUTPUT" + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + EXCEPT_USERS: ${{ inputs.except-users }} + EXCEPT_AUTHOR_ASSOCIATIONS: ${{ inputs.except-author-associations }} + shell: bash + + - name: Comment on pull request + if: > + fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.comment-limit) && + inputs.comment != '' + run: | + gh pr comment '${{ github.event.pull_request.number }}' \ + --body="${COMMENT_BODY}" + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + COMMENT_BODY: ${{ inputs.comment }} + shell: bash + + - name: Close pull request + if: > + fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.close-limit) && + inputs.close == 'true' + run: | + gh pr close '${{ github.event.pull_request.number }}' + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + shell: bash From f23959bb057df011aa3595f0e2579017cf7eac15 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:24:18 -0400 Subject: [PATCH 07/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 43 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 951fd02c1..077eb0c4d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,26 +1,25 @@ name: PR Check - -on: - pull_request: - types: - - opened - +on: pull_request_target +env: + GH_REPO: ${{ github.repository }} + GH_NO_UPDATE_NOTIFIER: 1 + GH_PROMPT_DISABLED: 1 +permissions: + contents: read + issues: write + pull-requests: write + statuses: write jobs: - check-pr: + limit-pull-requests: + if: always() && github.repository_owner == 'Homebrew' runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Get PR count - id: pr-count - run: | - PR_COUNT=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/naturalcrit/homebrewery/pulls? state=open&head=${{ github.actor }}:${{ github.head_ref }}" | jq '. | length') - echo "::set-output name=pr_count::$PR_COUNT" - - - name: Update PR description - if: ${{ steps.pr_count.outputs.pr_count }} -ge 1 - run: | - gh pr edit ${{ github.event.number }} --body "You already have ${{ steps.pr-count.outputs.pr_count }} PRs open. Consider completing some of your existing PRs before opening new ones." + - uses: Homebrew/actions/limit-pull-requests@master + with: + except-users: | + dependabot + comment-limit: 1 + comment: | + Hi, thanks for your contribution to the Homebrewery! You already have >=3 open pull requests. Consider completing some of your existing PRs before opening new ones. Thanks! + close-limit: 5 + close: false From 8b6be1cab8d2ae4fd775c68f69037d2448b6522d Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:33:55 -0400 Subject: [PATCH 08/15] Create limit-pull-requests.yml --- .../limit-pull-requests.yml | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/actions/limit-pull-requests/limit-pull-requests.yml diff --git a/.github/actions/limit-pull-requests/limit-pull-requests.yml b/.github/actions/limit-pull-requests/limit-pull-requests.yml new file mode 100644 index 000000000..413fa0624 --- /dev/null +++ b/.github/actions/limit-pull-requests/limit-pull-requests.yml @@ -0,0 +1,103 @@ +name: Limit pull requests +description: > + Limit the number of open pull requests to the repository created by a user +author: ZhongRuoyu (from Homebrew repository) +branding: + icon: alert-triangle + color: yellow + +inputs: + token: + description: GitHub token + required: false + default: ${{ github.token }} + except-users: + description: The users exempted from the limit, one per line + required: false + # https://docs.github.com/en/graphql/reference/enums#commentauthorassociation + except-author-associations: + description: The author associations exempted from the limit, one per line + required: false + comment-limit: + description: > + Post the comment when the user's number of open pull requests exceeds this + number and `comment` is not empty + required: true + default: "10" + comment: + description: The comment to post when the limit is reached + required: false + close-limit: + description: > + Close the pull request when the user's number of open pull requests + exceeds this number and `close` is set to `true` + required: true + default: "50" + close: + description: Whether to close the pull request when the limit is reached + required: true + default: "false" + +runs: + using: composite + steps: + - name: Check the number of pull requests + id: count-pull-requests + run: | + # If the user is exempted, assume they have no pull requests. + if grep -Fiqx '${{ github.actor }}' <<<"$EXCEPT_USERS"; then + echo "::notice::@${{ github.actor }} is exempted from the limit." + echo "count=0" >>"$GITHUB_OUTPUT" + exit 0 + fi + if grep -Fiqx '${{ github.event.pull_request.author_association }}' <<<"$EXCEPT_AUTHOR_ASSOCIATIONS"; then + echo "::notice::@{{ github.actor }} is a ${{ github.event.pull_request.author_association }} exempted from the limit." + echo "count=0" >>"$GITHUB_OUTPUT" + exit 0 + fi + + count="$( + gh api \ + --method GET \ + --header 'Accept: application/vnd.github+json' \ + --header 'X-GitHub-Api-Version: 2022-11-28' \ + --field state=open \ + --paginate \ + '/repos/{owner}/{repo}/pulls' | + jq \ + --raw-output \ + --arg USER '${{ github.actor }}' \ + 'map(select(.user.login == $USER)) | length' + )" + echo "::notice::@${{ github.actor }} has $count open pull request(s)." + echo "count=$count" >>"$GITHUB_OUTPUT" + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + EXCEPT_USERS: ${{ inputs.except-users }} + EXCEPT_AUTHOR_ASSOCIATIONS: ${{ inputs.except-author-associations }} + shell: bash + + - name: Comment on pull request + if: > + fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.comment-limit) && + inputs.comment != '' + run: | + gh pr comment '${{ github.event.pull_request.number }}' \ + --body="${COMMENT_BODY}" + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + COMMENT_BODY: ${{ inputs.comment }} + shell: bash + + - name: Close pull request + if: > + fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.close-limit) && + inputs.close == 'true' + run: | + gh pr close '${{ github.event.pull_request.number }}' + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ inputs.token }} + shell: bash From 6e69696b4a6eaf94641ef44510da693cbecda9f9 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:34:06 -0400 Subject: [PATCH 09/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 077eb0c4d..7784ce98e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -14,7 +14,7 @@ jobs: if: always() && github.repository_owner == 'Homebrew' runs-on: ubuntu-latest steps: - - uses: Homebrew/actions/limit-pull-requests@master + - uses: ./.github/actions/limit-pull-requests with: except-users: | dependabot From 9f4545606610a65d09070ed63c110c4f341bfdb1 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:34:26 -0400 Subject: [PATCH 10/15] Delete .github/workflows/limit-pull-requests.yml --- .github/workflows/limit-pull-requests.yml | 103 ---------------------- 1 file changed, 103 deletions(-) delete mode 100644 .github/workflows/limit-pull-requests.yml diff --git a/.github/workflows/limit-pull-requests.yml b/.github/workflows/limit-pull-requests.yml deleted file mode 100644 index 413fa0624..000000000 --- a/.github/workflows/limit-pull-requests.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Limit pull requests -description: > - Limit the number of open pull requests to the repository created by a user -author: ZhongRuoyu (from Homebrew repository) -branding: - icon: alert-triangle - color: yellow - -inputs: - token: - description: GitHub token - required: false - default: ${{ github.token }} - except-users: - description: The users exempted from the limit, one per line - required: false - # https://docs.github.com/en/graphql/reference/enums#commentauthorassociation - except-author-associations: - description: The author associations exempted from the limit, one per line - required: false - comment-limit: - description: > - Post the comment when the user's number of open pull requests exceeds this - number and `comment` is not empty - required: true - default: "10" - comment: - description: The comment to post when the limit is reached - required: false - close-limit: - description: > - Close the pull request when the user's number of open pull requests - exceeds this number and `close` is set to `true` - required: true - default: "50" - close: - description: Whether to close the pull request when the limit is reached - required: true - default: "false" - -runs: - using: composite - steps: - - name: Check the number of pull requests - id: count-pull-requests - run: | - # If the user is exempted, assume they have no pull requests. - if grep -Fiqx '${{ github.actor }}' <<<"$EXCEPT_USERS"; then - echo "::notice::@${{ github.actor }} is exempted from the limit." - echo "count=0" >>"$GITHUB_OUTPUT" - exit 0 - fi - if grep -Fiqx '${{ github.event.pull_request.author_association }}' <<<"$EXCEPT_AUTHOR_ASSOCIATIONS"; then - echo "::notice::@{{ github.actor }} is a ${{ github.event.pull_request.author_association }} exempted from the limit." - echo "count=0" >>"$GITHUB_OUTPUT" - exit 0 - fi - - count="$( - gh api \ - --method GET \ - --header 'Accept: application/vnd.github+json' \ - --header 'X-GitHub-Api-Version: 2022-11-28' \ - --field state=open \ - --paginate \ - '/repos/{owner}/{repo}/pulls' | - jq \ - --raw-output \ - --arg USER '${{ github.actor }}' \ - 'map(select(.user.login == $USER)) | length' - )" - echo "::notice::@${{ github.actor }} has $count open pull request(s)." - echo "count=$count" >>"$GITHUB_OUTPUT" - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ inputs.token }} - EXCEPT_USERS: ${{ inputs.except-users }} - EXCEPT_AUTHOR_ASSOCIATIONS: ${{ inputs.except-author-associations }} - shell: bash - - - name: Comment on pull request - if: > - fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.comment-limit) && - inputs.comment != '' - run: | - gh pr comment '${{ github.event.pull_request.number }}' \ - --body="${COMMENT_BODY}" - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ inputs.token }} - COMMENT_BODY: ${{ inputs.comment }} - shell: bash - - - name: Close pull request - if: > - fromJSON(steps.count-pull-requests.outputs.count) > fromJSON(inputs.close-limit) && - inputs.close == 'true' - run: | - gh pr close '${{ github.event.pull_request.number }}' - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ inputs.token }} - shell: bash From 08e273bfd6183b8043b18e35989dac7a91c20743 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:37:23 -0400 Subject: [PATCH 11/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 7784ce98e..7c986de7e 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,5 +1,8 @@ name: PR Check -on: pull_request_target +on: + pull_request: + types: + - opened env: GH_REPO: ${{ github.repository }} GH_NO_UPDATE_NOTIFIER: 1 From 19961c7ec55e7dcbea69fa82b2b6bb5db4418f9a Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:48:30 -0400 Subject: [PATCH 12/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 7c986de7e..c2c3a5a04 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,8 +1,5 @@ name: PR Check -on: - pull_request: - types: - - opened +on: pull_request_target env: GH_REPO: ${{ github.repository }} GH_NO_UPDATE_NOTIFIER: 1 @@ -14,7 +11,7 @@ permissions: statuses: write jobs: limit-pull-requests: - if: always() && github.repository_owner == 'Homebrew' + if: always() && github.repository_owner == 'naturalcrit' runs-on: ubuntu-latest steps: - uses: ./.github/actions/limit-pull-requests From 1e5e3d5f4197f1409e1f068184e94802ba55f753 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:50:01 -0400 Subject: [PATCH 13/15] Rename limit-pull-requests.yml to action.yml --- .../limit-pull-requests/{limit-pull-requests.yml => action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/limit-pull-requests/{limit-pull-requests.yml => action.yml} (100%) diff --git a/.github/actions/limit-pull-requests/limit-pull-requests.yml b/.github/actions/limit-pull-requests/action.yml similarity index 100% rename from .github/actions/limit-pull-requests/limit-pull-requests.yml rename to .github/actions/limit-pull-requests/action.yml From 80bcf92fa3e070a99778794b0b617c72de197a32 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 11:57:44 -0400 Subject: [PATCH 14/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c2c3a5a04..ac1eb3190 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -14,7 +14,11 @@ jobs: if: always() && github.repository_owner == 'naturalcrit' runs-on: ubuntu-latest steps: - - uses: ./.github/actions/limit-pull-requests + - name: Checkout + uses: actions/checkout@v2 + + - name : Run limit-pull-requests action + uses: ./.github/actions/limit-pull-requests with: except-users: | dependabot From 98d032913b0c236acabaf3a98ca2bea2fc087f76 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 19 Apr 2024 12:00:11 -0400 Subject: [PATCH 15/15] Update pr-check.yml --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index ac1eb3190..e5adb2561 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -22,7 +22,7 @@ jobs: with: except-users: | dependabot - comment-limit: 1 + comment-limit: 3 comment: | Hi, thanks for your contribution to the Homebrewery! You already have >=3 open pull requests. Consider completing some of your existing PRs before opening new ones. Thanks! close-limit: 5