Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle missing properties, error types, and stack in @stdlib/error/reviver #6353

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"postCreateCommand": "./.devcontainer/post-create",
"customizations": {
"codespaces": {
"openFiles": [
"README.md"
]
"openFiles": ["README.md"]
},
"vscode": {
"settings": {
Expand Down
44 changes: 15 additions & 29 deletions .github/workflows/autoclose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ on:

# Workflow jobs:
jobs:

# Define a job which closes a pull request if a contributor failed to setup EditorConfig:
editorconfig:

# Define job name:
name: 'Check for EditorConfig label'
name: "Check for EditorConfig label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: EditorConfig' }}"
Expand All @@ -42,9 +40,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -61,9 +58,8 @@ jobs:

# Define a job which closes a pull request if a contributor failed to follow contributing guidelines:
contributor_guidelines:

# Define job name:
name: 'Check for contributor guidelines label'
name: "Check for contributor guidelines label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Contributor Guidelines' }}"
Expand All @@ -73,9 +69,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -92,9 +87,8 @@ jobs:

# Define a job which closes a pull request if a contributor failed to follow project conventions:
project_conventions:

# Define job name:
name: 'Check for project conventions label'
name: "Check for project conventions label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Project Conventions' }}"
Expand All @@ -104,9 +98,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -127,9 +120,8 @@ jobs:

# Define a job which closes a pull request if a pull request is considered spam:
spam:

# Define job name:
name: 'Check for spam label'
name: "Check for spam label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Spam' }}"
Expand All @@ -139,9 +131,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -153,7 +144,7 @@ jobs:
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

# Lock pull request conversation:
- name: 'Lock conversation'
- name: "Lock conversation"
run: gh pr lock "$NUMBER" --reason spam
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -162,9 +153,8 @@ jobs:

# Define a job which closes a pull request if a pull request is considered stale:
stale:

# Define job name:
name: 'Check for stale label'
name: "Check for stale label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Stale' }}"
Expand All @@ -175,7 +165,7 @@ jobs:
# Define the sequence of job steps:
steps:
# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -188,9 +178,8 @@ jobs:

# Define a job which closes a pull request if a PR has an inappropriate Git history:
git_history:

# Define job name:
name: 'Check for Git History label'
name: "Check for Git History label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Git History' }}"
Expand All @@ -200,9 +189,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand All @@ -224,9 +212,8 @@ jobs:

# Define a job which closes a pull request if proposed changes duplicate already included changes:
already_resolved:

# Define job name:
name: 'Check for already resolved label'
name: "Check for already resolved label"

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Already Resolved' }}"
Expand All @@ -236,9 +223,8 @@ jobs:

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
- name: "Close pull request"
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/check_commit_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ permissions:

# Workflow jobs:
jobs:

# Define a job for checking the commit metadata for whether local development is properly setup...
check_commit_metadata:

# Define a display name:
name: 'Check Commit Metadata'
name: "Check Commit Metadata"

# Define the type of virtual host machine:
runs-on: ubuntu-latest
Expand All @@ -49,24 +47,24 @@ jobs:
# Define the sequence of job steps...
steps:
# Checkout the repository:
- name: 'Checkout repository'
- name: "Checkout repository"
# Pin action to full length commit SHA
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Ensure we have access to the scripts directory:
sparse-checkout: |
.github/workflows/scripts
.github/workflows/scripts
sparse-checkout-cone-mode: false
timeout-minutes: 10

# Extract commit metadata from commit messages as JSON:
- name: 'Extract commit metadata'
- name: "Extract commit metadata"
id: extract-metadata
# Pin action to full length commit SHA
uses: stdlib-js/metadata-action@3ccf68f24c51ae23470319e8e5619d539df8212b # v3.0.0

# Check commit metadata:
- name: 'Check commit metadata'
- name: "Check commit metadata"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMIT_METADATA: ${{ steps.extract-metadata.outputs.metadata }}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/generate_pr_commit_message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ permissions:

# Workflow jobs:
jobs:

# Job to generate commit message draft:
generate-commit-message:

# Define a display name:
name: 'Generate PR Commit Message Draft'
name: "Generate PR Commit Message Draft"

# Define the type of virtual host machine:
runs-on: ubuntu-latest
Expand All @@ -52,7 +50,7 @@ jobs:
# Define the sequence of job steps...
steps:
# Checkout repository:
- name: 'Checkout repository'
- name: "Checkout repository"
# Pin action to full length commit SHA
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -63,7 +61,7 @@ jobs:
sparse-checkout-cone-mode: false

# Generate commit message:
- name: 'Generate commit message'
- name: "Generate commit message"
id: commit_message
run: |
COMMIT_MESSAGE=$($GITHUB_WORKSPACE/.github/workflows/scripts/generate_pr_commit_message $PR_NUMBER)
Expand All @@ -83,7 +81,7 @@ jobs:
exit 0

# Post commit message as PR comment:
- name: 'Post commit message as PR comment'
- name: "Post commit message as PR comment"
# Pin action to full length commit SHA
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
Expand Down
Loading