Repository: stackblitz/core Branch: main Commit: 26e096403622 Files: 9 Total size: 16.1 KB Directory structure: gitextract_5v4j3fyg/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report.md │ │ └── feature-request.md │ └── workflows/ │ ├── close-empty-issues.yml │ ├── close-inactive-issues-without-repro.yaml │ ├── close-lock-engineblock-issues.yml │ └── close-stale-issues.yml ├── .gitignore ├── LICENSE └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE/bug-report.md ================================================ --- name: Bug Report about: Something not working? Let us know! title: '' labels: 'Status: Triage, Type: Bug' assignees: '' --- ### **Description of Bug** Provide a concise description of your bug and your project link (if applicable). ### **Steps to Reproduce** 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error ### **Expected Behavior** A clear and concise description of what you expected to happen. ### **Screenshots/Screencast** If applicable, add screenshots to help explain your problem. **Additional Context/Questions** Add any other context or questions regarding this bug. ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request.md ================================================ --- name: Feature Request about: Got a suggestion for a feature request? Let us know! title: '' labels: 'Status: Triage, Type: Feature Request' assignees: '' --- ### **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] ### **Describe the solution you'd like** A clear and concise description of what you want to happen. ### **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. ### **Additional context** Add any context or screenshots about the feature request here. ================================================ FILE: .github/workflows/close-empty-issues.yml ================================================ name: Close Issues with Blank Description on: issues: types: [opened] jobs: closeEmptyIssues: if: "${{ github.event.issue.body == '' }}" runs-on: ubuntu-latest steps: - name: close empty issues # v1.0.0 uses: kerhub/saved-replies@dd3633c3608fcc768978988b012871d66f98f7d6 with: token: ${{ secrets.GITHUB_TOKEN }} state: 'closed' reply: | A minimal context is required to triage your issue. Please open a new issue using one of our templates available [here](https://github.com/stackblitz/core/issues/new/choose) ================================================ FILE: .github/workflows/close-inactive-issues-without-repro.yaml ================================================ name: Close Issues with Tag Needs Repro Link on: schedule: - cron: '0 0 * * *' # Run every day at midnight workflow_dispatch: jobs: close-issues: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Node.js uses: actions/setup-node@v2 - name: Install jq and date command run: sudo apt-get update && sudo apt-get install -y jq dateutils - name: Close Inactive Issues that are missing Repro Link env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LABEL_NAME: 'Status: Needs a reproduction link' LABEL_NAME_URL: 'Status%3A%20Needs%20a%20reproduction%20link' 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.' run: | set -e set -x page=1 while : ; do echo "Fetching page $page of issues..." response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME_URL&per_page=100&page=$page") echo $response > issues.json if [ $(jq length issues.json) -eq 0 ]; then echo "No more issues found." break fi echo "Checking issues for closure..." jq -c '.[] | {number: .number}' issues.json | while read -r line; do issue=$(echo $line | jq -r '.number') timeline=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.mockingbird-preview" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/timeline") echo $timeline > timeline.json # Find the time when the label was added label_added_at=$(jq -c 'map(select(.event=="labeled" and (.label.name | contains("'"$LABEL_NAME"'")))) | .[0].created_at' timeline.json) if [ "$label_added_at" != "null" ]; then label_added_at=$(echo $label_added_at | jq -r) # Check if there has been any activity after the label was added has_activity_after_label=$(jq -c "map(select(.created_at > \"$label_added_at\")) | length" timeline.json) # Check if at least 1 day has passed since the label was added current_time=$(date --utc +'%Y-%m-%dT%H:%M:%SZ') is_day_old=$(dateutils.ddiff "$label_added_at" "$current_time" -f '%H:%M:%S' | awk -F: '{if ($1 >= 24) print "yes"; else print "no";}') if [ "$is_day_old" = "yes" ] && [ "$has_activity_after_label" = "0" ]; then echo "Commenting and closing issue $issue..." # Comment on the issue COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ -d "{\"body\": \"$CUSTOM_MESSAGE\"}") HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully commented on issue $issue." else echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS" exit 1 fi # Close the issue RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ -d "{\"state\": \"closed\"}") HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully closed issue $issue." else echo "Failed to close issue $issue. HTTP Status: $HTTP_STATUS" exit 1 fi else echo "Issue $issue does not meet closure criteria. Skipping." fi else echo "Label not found for issue $issue. Skipping." fi done ((page++)) done ================================================ FILE: .github/workflows/close-lock-engineblock-issues.yml ================================================ name: Close and Lock Issues with Status Stale Label on: schedule: - cron: "0 0 * * *" # Run every day at midnight workflow_dispatch: # Allows manual triggering jobs: close-issues: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Node.js uses: actions/setup-node@v2 - name: Install jq run: sudo apt-get update && sudo apt-get install -y jq - name: Close and lock issues env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LABEL_NAME: "Status%3A%20EngineBlock" 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.' run: | set -e # Stop the script if any command fails set -x # Echo each command before executing it page=1 while : ; do echo "Fetching page $page of issues..." response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=1&page=$page") echo $response > issues.json if [ $(jq length issues.json) -eq 0 ]; then echo "No more issues found." break fi echo "Commenting, closing, and locking issues..." jq -c '.[] | .number' issues.json | while read -r issue; do # Comment on the issue COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ -d "{\"body\": \"$CUSTOM_MESSAGE\"}") HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully commented on issue $issue." else echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" exit 1 fi # Close and lock the issue RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ -d "{\"state\": \"closed\", \"lock_reason\": \"resolved\"}") HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully closed and locked issue $issue." else echo "Failed to close and lock issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" exit 1 fi done done ================================================ FILE: .github/workflows/close-stale-issues.yml ================================================ name: Close Issues with Status Stale Label on: schedule: - cron: '0 0 * * *' # Run every day at midnight workflow_dispatch: # Allows manual triggering jobs: close-issues: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Node.js uses: actions/setup-node@v2 - name: Install jq run: sudo apt-get update && sudo apt-get install -y jq - name: Close Issues env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LABEL_NAME: 'Status%3A%20Stale' 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!' run: | set -e # Stop the script if any command fails set -x # Echo each command before executing it page=1 while : ; do echo "Fetching page $page of issues..." response=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=100&page=$page") echo $response > issues.json if [ $(jq length issues.json) -eq 0 ]; then echo "No more issues found." break fi echo "Commenting and closing issues..." jq -c '.[] | .number' issues.json | while read -r issue; do # Comment on the issue COMMENT_RESPONSE=$(curl -sS -w "%{http_code}" -X POST -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments" \ -d "{\"body\": \"$CUSTOM_MESSAGE\"}") HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev) RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully commented on issue $issue." else echo "Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" exit 1 fi # Close the issue RESPONSE=$(curl -sS -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue" \ -d "{\"state\": \"closed\"}") HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev) RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev) if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 300 ]; then echo "Successfully closed issue $issue." else echo "Failed to close issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY" exit 1 fi done ((page++)) done ================================================ FILE: .gitignore ================================================ node_modules .DS_Store ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2021 StackBlitz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # StackBlitz — Your local env, now in the browser [![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) Welcome to the StackBlitz GitHub repository! 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)! ## Learn more - [Read our docs](https://developer.stackblitz.com/) to learn about our features for developers, open-source and design system maintainers, and more. - [Check out our blog](https://blog.stackblitz.com/) for all the latest news, and deep dives in the Web technologies that power StackBlitz. ## Other repositories - StackBlitz docs: [stackblitz/docs](https://github.com/stackblitz/docs) - StackBlitz SDK: [stackblitz/sdk](https://github.com/stackblitz/sdk) - Starter templates: [stackblitz/starters](https://github.com/stackblitz/starters) - WebContainers: [stackblitz/webcontainer-core](https://github.com/stackblitz/webcontainer-core) - WebContainer API docs: [stackblitz/webcontainer-docs](https://github.com/stackblitz/webcontainer-docs)