Skip to content

Commit

Permalink
Merge branch 'master' into switch
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 authored Jul 11, 2023
2 parents 7ecaf30 + 9094eb1 commit 9d4c315
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/add-scope-to-bet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: parse
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
result-encoding: json
script: |
const regexSimple = /(Related\sto\s+(\S+)?#(\d+))/;
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
uses: actions/github-script@v6
if: ${{ steps.parse.outputs.result }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
script: |
const results = ${{ steps.parse.outputs.result }};
if (!results) {
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/lint-pr-adr.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: PR ADR Validation Workflow

on:
pull_request:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
- labeled
- unlabeled
- ready_for_review

jobs:
validate_adr_pr:
Expand All @@ -18,7 +20,7 @@ jobs:
id: lint_title_adr
with:
result-encoding: json
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
script: |
const title = context.payload.pull_request.title;
const labels = context.payload.pull_request.labels;
Expand Down Expand Up @@ -59,7 +61,7 @@ jobs:
# condition you can continue the execution with the populated error message.
with:
header: pr-title-lint-adr-error
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
message: |
Hey there and thank you for opening this ADR pull request! 👋🏼
The ADR Pull request must follow this PR naming convention:
Expand All @@ -70,7 +72,7 @@ jobs:
- if: (fromJSON(steps.lint_title_adr.outputs.result).status == 'ok')
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
header: pr-title-lint-adr-error
delete: true
- if: (fromJSON(steps.lint_title_adr.outputs.result).status == 'ok')
Expand Down Expand Up @@ -102,7 +104,7 @@ jobs:
# condition you can continue the execution with the populated error message.
with:
header: pr-files-changed-adr-error
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
message: |
Hey there and thank you for opening this ADR pull request! 👋🏼
The ADR Pull request must change only the ADR file that match ${{ fromJSON(steps.lint_title_adr.outputs.result).expectedFileMatch }}
Expand All @@ -115,6 +117,6 @@ jobs:
name: Delete comment fail changed
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
header: pr-files-changed-adr-error
delete: true

0 comments on commit 9d4c315

Please sign in to comment.