├── .gitignore ├── .github ├── workflows │ ├── close-empty-issues.yml │ ├── close-stale-issues.yml │ ├── close-lock-engineblock-issues.yml │ └── close-inactive-issues-without-repro.yaml └── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature-request.md ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /.github/workflows/close-empty-issues.yml: -------------------------------------------------------------------------------- 1 | name: Close Issues with Blank Description 2 | on: 3 | issues: 4 | types: [opened] 5 | jobs: 6 | closeEmptyIssues: 7 | if: "${{ github.event.issue.body == '' }}" 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: close empty issues 11 | # v1.0.0 12 | uses: kerhub/saved-replies@dd3633c3608fcc768978988b012871d66f98f7d6 13 | with: 14 | token: ${{ secrets.GITHUB_TOKEN }} 15 | state: 'closed' 16 | reply: | 17 | A minimal context is required to triage your issue. 18 | 19 | Please open a new issue using one of our templates available [here](https://github.com/stackblitz/core/issues/new/choose) 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Something not working? Let us know! 4 | title: '' 5 | labels: 'Status: Triage, Type: Bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### **Description of Bug** 11 | Provide a concise description of your bug and your project link (if applicable). 12 | 13 | 14 | ### **Steps to Reproduce** 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | 22 | ### **Expected Behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | 26 | ### **Screenshots/Screencast** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | 30 | **Additional Context/Questions** 31 | Add any other context or questions regarding this bug. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Got a suggestion for a feature request? Let us know! 4 | title: '' 5 | labels: 'Status: Triage, Type: Feature Request' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | 14 | ### **Describe the solution you'd like** 15 | A clear and concise description of what you want to happen. 16 | 17 | 18 | ### **Describe alternatives you've considered** 19 | A clear and concise description of any alternative solutions or features you've considered. 20 | 21 | 22 | ### **Additional context** 23 | Add any context or screenshots about the feature request here. 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 StackBlitz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StackBlitz — Your local env, now in the browser 2 | 3 | [![Chat on Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/stackblitz)  [![Read our docs](https://img.shields.io/badge/read-our%20docs-1374ef.svg)](https://developer.stackblitz.com) 4 | 5 | Welcome to the StackBlitz GitHub repository! 6 | 7 | This repository serves as our primary way of [keeping track of bugs](https://github.com/stackblitz/core/issues). If you have any questions/ideas/feedback, feel free to [open an issue](https://github.com/stackblitz/core/issues/new/choose), or come chat with us on [Discord](https://discord.gg/stackblitz)! 8 | 9 | ## Learn more 10 | 11 | - [Read our docs](https://developer.stackblitz.com/) to learn about our features for developers, open-source and design system maintainers, and more. 12 | - [Check out our blog](https://blog.stackblitz.com/) for all the latest news, and deep dives in the Web technologies that power StackBlitz. 13 | 14 | ## Other repositories 15 | 16 | - StackBlitz docs: [stackblitz/docs](https://github.com/stackblitz/docs) 17 | - StackBlitz SDK: [stackblitz/sdk](https://github.com/stackblitz/sdk) 18 | - Starter templates: [stackblitz/starters](https://github.com/stackblitz/starters) 19 | - WebContainers: [stackblitz/webcontainer-core](https://github.com/stackblitz/webcontainer-core) 20 | - WebContainer API docs: [stackblitz/webcontainer-docs](https://github.com/stackblitz/webcontainer-docs) 21 | -------------------------------------------------------------------------------- /.github/workflows/close-stale-issues.yml: -------------------------------------------------------------------------------- 1 | name: Close Issues with Status Stale Label 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' # Run every day at midnight 6 | workflow_dispatch: # Allows manual triggering 7 | 8 | jobs: 9 | close-issues: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Install Node.js 17 | uses: actions/setup-node@v2 18 | 19 | - name: Install jq 20 | run: sudo apt-get update && sudo apt-get install -y jq 21 | 22 | - name: Close Issues 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | LABEL_NAME: 'Status%3A%20Stale' 26 | CUSTOM_MESSAGE: 'Apologies that we were unable to address this issue in a timely manner! \n \n Given that we have millions of free users this has been a challenge, and we are working to improve over time. As part of an effort to focus on driving the most recent issues to resolution, this issue is being closed. \n \n If this issue is still meaningful, please comment with an update and re-open the issue for troubleshooting! Thanks for your continued loyalty to the StackBlitz platform over the years!' 27 | run: | 28 | set -e # Stop the script if any command fails 29 | set -x # Echo each command before executing it 30 | 31 | page=1 32 | while : ; do 33 | echo "Fetching page $page of issues..." 34 | response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ 35 | -H "Accept: application/vnd.github.v3+json" \ 36 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=100&page=$page") 37 | 38 | echo $response > issues.json 39 | 40 | if [ $(jq length issues.json) -eq 0 ]; then 41 | echo "No more issues found." 42 | break 43 | fi 44 | 45 | echo "Commenting and closing issues..." 46 | jq -c '.[] | .number' issues.json | while read -r issue; do 47 | # Comment on the issue 48 | COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ 49 | -H "Accept: application/vnd.github.v3+json" \ 50 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ 51 | -d "{\"body\": \"$CUSTOM_MESSAGE\"}") 52 | 53 | HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) 54 | RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev) 55 | 56 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 57 | echo "Successfully commented on issue $issue." 58 | else 59 | echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" 60 | exit 1 61 | fi 62 | 63 | # Close the issue 64 | RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ 65 | -H "Accept: application/vnd.github.v3+json" \ 66 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ 67 | -d "{\"state\": \"closed\"}") 68 | 69 | HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) 70 | RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev) 71 | 72 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 73 | echo "Successfully closed issue $issue." 74 | else 75 | echo "Failed to close issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" 76 | exit 1 77 | fi 78 | done 79 | 80 | ((page++)) 81 | done 82 | -------------------------------------------------------------------------------- /.github/workflows/close-lock-engineblock-issues.yml: -------------------------------------------------------------------------------- 1 | name: Close and Lock Issues with Status Stale Label 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" # Run every day at midnight 6 | workflow_dispatch: # Allows manual triggering 7 | 8 | jobs: 9 | close-issues: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Install Node.js 17 | uses: actions/setup-node@v2 18 | 19 | - name: Install jq 20 | run: sudo apt-get update && sudo apt-get install -y jq 21 | 22 | - name: Close and lock issues 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | LABEL_NAME: "Status%3A%20EngineBlock" 26 | CUSTOM_MESSAGE: 'Hey there! \n \n It looks like you are using an EngineBlock project, which we recently removed from our starters. You can read more about how we are upgrading our starters here: [Starters Upgrade: WebContainers and Vite](https://blog.stackblitz.com/posts/webcontainers-starters-update/).\n\nMoving forward I would recommend that you see if this problem persists in a WebContainer based project. You can do that by simply clicking one of the links below: \n [node.new](https://node.new) \n [vite.new](https://vite.new) \n Or even more here.\n\nFor now, I am going to close this issue, but feel free to open a new one if you have any issues with the WebContainer based project.' 27 | run: | 28 | set -e # Stop the script if any command fails 29 | set -x # Echo each command before executing it 30 | 31 | page=1 32 | while : ; do 33 | echo "Fetching page $page of issues..." 34 | response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ 35 | -H "Accept: application/vnd.github.v3+json" \ 36 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=1&page=$page") 37 | 38 | echo $response > issues.json 39 | 40 | if [ $(jq length issues.json) -eq 0 ]; then 41 | echo "No more issues found." 42 | break 43 | fi 44 | 45 | echo "Commenting, closing, and locking issues..." 46 | jq -c '.[] | .number' issues.json | while read -r issue; do 47 | # Comment on the issue 48 | COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ 49 | -H "Accept: application/vnd.github.v3+json" \ 50 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ 51 | -d "{\"body\": \"$CUSTOM_MESSAGE\"}") 52 | 53 | HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) 54 | RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev) 55 | 56 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 57 | echo "Successfully commented on issue $issue." 58 | else 59 | echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" 60 | exit 1 61 | fi 62 | 63 | # Close and lock the issue 64 | RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ 65 | -H "Accept: application/vnd.github.v3+json" \ 66 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ 67 | -d "{\"state\": \"closed\", \"lock_reason\": \"resolved\"}") 68 | 69 | HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) 70 | RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev) 71 | 72 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 73 | echo "Successfully closed and locked issue $issue." 74 | else 75 | echo "Failed to close and lock issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" 76 | exit 1 77 | fi 78 | done 79 | done 80 | -------------------------------------------------------------------------------- /.github/workflows/close-inactive-issues-without-repro.yaml: -------------------------------------------------------------------------------- 1 | name: Close Issues with Tag Needs Repro Link 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' # Run every day at midnight 6 | workflow_dispatch: 7 | 8 | jobs: 9 | close-issues: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Install Node.js 17 | uses: actions/setup-node@v2 18 | 19 | - name: Install jq and date command 20 | run: sudo apt-get update && sudo apt-get install -y jq dateutils 21 | 22 | - name: Close Inactive Issues that are missing Repro Link 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | LABEL_NAME: 'Status: Needs a reproduction link' 26 | LABEL_NAME_URL: 'Status%3A%20Needs%20a%20reproduction%20link' 27 | CUSTOM_MESSAGE: 'In order to investigate further we need a link to a StackBlitz project reproducing the issue. \n \n As this issue has been inactive for 1 day without a reproduction link, it will be closed to allow prioritization of other issues. /n /n If this needs additional investigation, please share a reproduction link by opening a new issue. Thanks for your diligence in helping us continuously improve the StackBlitz platform.' 28 | run: | 29 | set -e 30 | set -x 31 | 32 | page=1 33 | while : ; do 34 | echo "Fetching page $page of issues..." 35 | response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ 36 | -H "Accept: application/vnd.github.v3+json" \ 37 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME_URL&per_page=100&page=$page") 38 | 39 | echo $response > issues.json 40 | 41 | if [ $(jq length issues.json) -eq 0 ]; then 42 | echo "No more issues found." 43 | break 44 | fi 45 | 46 | echo "Checking issues for closure..." 47 | jq -c '.[] | {number: .number}' issues.json | while read -r line; do 48 | issue=$(echo $line | jq -r '.number') 49 | 50 | timeline=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ 51 | -H "Accept: application/vnd.github.mockingbird-preview" \ 52 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/timeline") 53 | 54 | echo $timeline > timeline.json 55 | 56 | # Find the time when the label was added 57 | label_added_at=$(jq -c 'map(select(.event=="labeled" and (.label.name | contains("'"$LABEL_NAME"'")))) | .[0].created_at' timeline.json) 58 | 59 | if [ "$label_added_at" != "null" ]; then 60 | label_added_at=$(echo $label_added_at | jq -r) 61 | 62 | # Check if there has been any activity after the label was added 63 | has_activity_after_label=$(jq -c "map(select(.created_at > \"$label_added_at\")) | length" timeline.json) 64 | 65 | # Check if at least 1 day has passed since the label was added 66 | current_time=$(date --utc +'%Y-%m-%dT%H:%M:%SZ') 67 | is_day_old=$(dateutils.ddiff "$label_added_at" "$current_time" -f '%H:%M:%S' | awk -F: '{if ($1 >= 24) print "yes"; else print "no";}') 68 | 69 | 70 | if [ "$is_day_old" = "yes" ] && [ "$has_activity_after_label" = "0" ]; then 71 | echo "Commenting and closing issue $issue..." 72 | # Comment on the issue 73 | COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ 74 | -H "Accept: application/vnd.github.v3+json" \ 75 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ 76 | -d "{\"body\": \"$CUSTOM_MESSAGE\"}") 77 | 78 | HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) 79 | 80 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 81 | echo "Successfully commented on issue $issue." 82 | else 83 | echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS" 84 | exit 1 85 | fi 86 | 87 | # Close the issue 88 | RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ 89 | -H "Accept: application/vnd.github.v3+json" \ 90 | "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ 91 | -d "{\"state\": \"closed\"}") 92 | 93 | HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) 94 | 95 | if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then 96 | echo "Successfully closed issue $issue." 97 | else 98 | echo "Failed to close issue $issue. HTTP Status: $HTTP_STATUS" 99 | exit 1 100 | fi 101 | else 102 | echo "Issue $issue does not meet closure criteria. Skipping." 103 | fi 104 | else 105 | echo "Label not found for issue $issue. Skipping." 106 | fi 107 | done 108 | 109 | ((page++)) 110 | done 111 | --------------------------------------------------------------------------------