diff options
Diffstat (limited to 'js/videojs/.github')
| -rw-r--r-- | js/videojs/.github/ISSUE_TEMPLATE/bug_report.yaml | 78 | ||||
| -rw-r--r-- | js/videojs/.github/PULL_REQUEST_TEMPLATE.md | 18 | ||||
| -rw-r--r-- | js/videojs/.github/actions/pr-titles.mjs | 13 | ||||
| -rw-r--r-- | js/videojs/.github/config.yml | 34 | ||||
| -rw-r--r-- | js/videojs/.github/first-timers-issue-template.md | 41 | ||||
| -rw-r--r-- | js/videojs/.github/first-timers.yml | 5 | ||||
| -rw-r--r-- | js/videojs/.github/move.yml | 24 | ||||
| -rw-r--r-- | js/videojs/.github/stale.yml | 59 | ||||
| -rw-r--r-- | js/videojs/.github/workflows/ci.yml | 72 | ||||
| -rw-r--r-- | js/videojs/.github/workflows/lock.yml | 22 | ||||
| -rw-r--r-- | js/videojs/.github/workflows/pr-titles.yml | 22 | ||||
| -rw-r--r-- | js/videojs/.github/workflows/release.yml | 96 |
12 files changed, 484 insertions, 0 deletions
diff --git a/js/videojs/.github/ISSUE_TEMPLATE/bug_report.yaml b/js/videojs/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..a89d04c --- /dev/null +++ b/js/videojs/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,78 @@ +name: General issue +description: Report a general issue with Video.js +labels: "needs: triage" +body: + - type: markdown + attributes: + value: | + Thank you for using Video.js and contributing by opening an issue. Before you start, please check this list: + * If you are not reporting a bug, but want to ask a general question, use [discussions](https://github.com/videojs/video.js/discussions) instead. + * Check the [FAQ](https://videojs.com/guides/faqs) and [troubleshooting guides](https://videojs.com/guides/troubleshooting). + * If there is an existing open issue for exactly the same problem, comment there instead. + * However, be careful not to comment on old and closed issues. Your new comment is unlikely to be noticed. + * Take care to make sure it is really the exact same issue. Conflating tangentially related issues is counterproductive. If in doubt, open as a new issue. + * Add useful new information, such as a new reproducible case to help narrow down the issue. + * If the issue is with a specific plugin, it's generally better to open an issue on the plugin repository instead. + * Please do take the time to give detailed information, and include a test case. A detailed issue with actionable information will get a better response than a vague anecdote. + - type: textarea + id: description + attributes: + label: Description + description: | + Please give a detailed description of the issue. + What did you expect to happen, and what happened? + validations: + required: true + - type: input + id: testcase + validations: + required: true + attributes: + label: Reduced test case + description: | + Please add a URL to a [reduced test case](https://stackoverflow.com/help/minimal-reproducible-example) where the issue can be observed. We have a [starter template](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0) on Codepen. + **Without a test case** it's unlikely your issue can be actioned. + For a playback problem, including the stream URL is _essential._ + placeholder: https:// + - type: textarea + id: str + attributes: + label: Steps to reproduce + description: Detailed steps to reproduce the issue. + value: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + id: errors + attributes: + label: Errors + description: If there is an error displayed in the player or in the console, please include them here. + - type: input + id: version + attributes: + label: What version of Video.js are you using? + description: Please include all relevant versions. If not using the latest version, explain why not in the description above. + placeholder: e.g. vX.Y.Z + validations: + required: true + - type: input + id: plugins + attributes: + label: Video.js plugins used. + - type: input + id: browser + attributes: + label: What browser(s) including version(s) does this occur with? + placeholder: e.g. Chrome 100 + validations: + required: true + - type: input + id: os + attributes: + label: What OS(es) and version(s) does this occur with? + placeholder: e.g. Windows 11 + validations: + required: true diff --git a/js/videojs/.github/PULL_REQUEST_TEMPLATE.md b/js/videojs/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..657703f --- /dev/null +++ b/js/videojs/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,18 @@ +## Description +Please describe the change as necessary. +If it's a feature or enhancement please be as detailed as possible. +If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail. + +## Specific Changes proposed +Please list the specific changes involved in this pull request. + +## Requirements Checklist +- [ ] Feature implemented / Bug fixed +- [ ] If necessary, more likely in a feature request than a bug fix + - [ ] Change has been verified in an actual browser (Chrome, Firefox, IE) + - [ ] Unit Tests updated or fixed + - [ ] Docs/guides updated + - [ ] Example created ([starter template on JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0)) + - [ ] Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab) + - [ ] Has no changes to JSDoc which cause `npm run docs:api` to error +- [ ] Reviewed by Two Core Contributors diff --git a/js/videojs/.github/actions/pr-titles.mjs b/js/videojs/.github/actions/pr-titles.mjs new file mode 100644 index 0000000..6712d48 --- /dev/null +++ b/js/videojs/.github/actions/pr-titles.mjs @@ -0,0 +1,13 @@ +import * as core from '@actions/core'; +import * as github from '@actions/github'; + +(async function run() { + const title = github.context.payload.pull_request?.title; + const titleRegex = /^(chore|ci|docs|feat|fix|refactor|revert|test)(\(.+\))?!?: (.+)/; + + if (!!title.match(titleRegex)) { + core.info('Pull request title is OK'); + } else { + core.setFailed('Please use conventional commit style for the PR title so the merged change appears in the changelog. See https://www.conventionalcommits.org/.'); + } +})(); diff --git a/js/videojs/.github/config.yml b/js/videojs/.github/config.yml new file mode 100644 index 0000000..f01798c --- /dev/null +++ b/js/videojs/.github/config.yml @@ -0,0 +1,34 @@ +# Configuration for welcome - https://github.com/behaviorbot/welcome +# Heavily inspired by https://github.com/electron/electron/blob/master/.github/config.yml + +# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome + +# Comment to be posted to on first time issues +newIssueWelcomeComment: | + 👋 Thanks for opening your first issue here! 👋 + + If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. + To help make it easier for us to investigate your issue, please follow the [contributing guidelines](https://github.com/videojs/video.js/blob/master/CONTRIBUTING.md). + +# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome + +# Comment to be posted to on PRs from first time contributors in your repository +newPRWelcomeComment: | + 💖 Thanks for opening this pull request! 💖 + + Things that will help get your PR across the finish line: + + - Run `npm run lint -- --errors` locally to catch formatting errors earlier. + - Include tests when adding/changing behavior. + - Include screenshots and animated GIFs whenever possible. + + We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. + +# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉🎉🎉 + +# Prevent issues being created without using the template +blank_issues_enabled: false diff --git a/js/videojs/.github/first-timers-issue-template.md b/js/videojs/.github/first-timers-issue-template.md new file mode 100644 index 0000000..8f74340 --- /dev/null +++ b/js/videojs/.github/first-timers-issue-template.md @@ -0,0 +1,41 @@ + +### 🆕🐥☝ First Timers Only. + +This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝 + +[About First Timers Only](http://www.firsttimersonly.com/). + +### 🤔 What you will need to know. + +Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process. + +### 📋 Step by Step + +- [ ] 🙋 **Claim this issue**: Comment below. + + Once claimed, we'll remove the 'unclaimed' label from the issue so others will know not to work on it. + +- [ ] 📝 **Update** the file [$FILENAME]($BRANCH_URL) in the `$REPO` repository (press the little pen Icon) and edit the line as shown below. + + +``````diff +$DIFF +`````` + + +- [ ] 💾 **Commit** your changes + +- [ ] 🔀 **Start a Pull Request**. There are two ways how you can start a pull request: + +1. If you are familiar with the terminal or would like to learn it, [here is a great tutorial](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) on how to send a pull request using the terminal. + +2. You can [edit files directly in your browser](https://help.github.com/articles/editing-files-in-your-repository/) + +- [ ] 🏁 **Done** Ask in comments for a review :) + +### 🤔❓ Questions + +Leave a comment below! Alternatively, drop by our [slack's #discussion channel](http://slack.videojs.com). + + +This issue was created by [First-Timers-Bot](https://github.com/hoodiehq/first-timers-bot). diff --git a/js/videojs/.github/first-timers.yml b/js/videojs/.github/first-timers.yml new file mode 100644 index 0000000..d75ceb0 --- /dev/null +++ b/js/videojs/.github/first-timers.yml @@ -0,0 +1,5 @@ +repository: 'video.js' +labels: + - first-timers-only + - unclaimed +template: .github/first-timers-issue-template.md diff --git a/js/videojs/.github/move.yml b/js/videojs/.github/move.yml new file mode 100644 index 0000000..1589712 --- /dev/null +++ b/js/videojs/.github/move.yml @@ -0,0 +1,24 @@ +# Configuration for move-issues - https://github.com/dessant/move-issues + +# Delete the command comment when it contains no other content +deleteCommand: true + +# Close the source issue after moving +closeSourceIssue: true + +# Lock the source issue after moving +lockSourceIssue: false + +# Mention issue and comment authors +mentionAuthors: true + +# Preserve mentions in the issue content +keepContentMentions: false + +# Set custom aliases for targets +# aliases: +# r: repo +# or: owner/repo + +# Repository to extend settings from +# _extends: repo diff --git a/js/videojs/.github/stale.yml b/js/videojs/.github/stale.yml new file mode 100644 index 0000000..dded02a --- /dev/null +++ b/js/videojs/.github/stale.yml @@ -0,0 +1,59 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 60 + +# Number of days of inactivity before a stale Issue or Pull Request is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 7 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - pinned + - a11y + - "Affects: a11y" + - confirmed + - security + - "[Status] Maybe Later" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Label to use when marking as stale +staleLabel: outdated + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed + diff --git a/js/videojs/.github/workflows/ci.yml b/js/videojs/.github/workflows/ci.yml new file mode 100644 index 0000000..c61b30e --- /dev/null +++ b/js/videojs/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +name: ci + +on: [push, pull_request] + +jobs: + should-skip: + continue-on-error: true + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should-skip-job: ${{steps.skip-check.outputs.should_skip}} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@v5.3.1 + with: + github_token: ${{github.token}} + + ci: + needs: should-skip + if: ${{needs.should-skip.outputs.should-skip-job != 'true' || github.ref == 'refs/heads/main'}} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + test-type: [unit, coverage] + env: + BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}} + BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}} + CI_TEST_TYPE: ${{matrix.test-type}} + runs-on: ${{matrix.os}} + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: read node version from .nvmrc + run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT + shell: bash + id: nvm + + - name: update apt cache on linux w/o browserstack + run: sudo apt-get update + + - name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack + run: sudo apt-get install ffmpeg pulseaudio + + - name: start pulseaudio for firefox on linux w/o browserstack + run: pulseaudio -D + + - name: setup node + uses: actions/setup-node@v4 + with: + node-version: '${{steps.nvm.outputs.NVMRC}}' + cache: npm + + # turn off the default setup-node problem watchers... + - run: echo "::remove-matcher owner=eslint-compact::" + - run: echo "::remove-matcher owner=eslint-stylish::" + - run: echo "::remove-matcher owner=tsc::" + + - name: npm install + run: npm i --prefer-offline --no-audit + + - name: run npm test + run: npm run test + + - name: coverage + uses: codecov/codecov-action@v4 + with: + token: ${{secrets.CODECOV_TOKEN}} + files: './test/dist/coverage/coverage-final.json' + fail_ci_if_error: true + if: ${{startsWith(env.CI_TEST_TYPE, 'coverage')}} diff --git a/js/videojs/.github/workflows/lock.yml b/js/videojs/.github/workflows/lock.yml new file mode 100644 index 0000000..bb58205 --- /dev/null +++ b/js/videojs/.github/workflows/lock.yml @@ -0,0 +1,22 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 1 * * 1,4' + workflow_dispatch: + +permissions: + issues: write + +concurrency: + group: lock + +jobs: + action: + if: ${{ github.repository_owner == 'videojs' }} + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + issue-inactive-days: '60' + process-only: 'issues' diff --git a/js/videojs/.github/workflows/pr-titles.yml b/js/videojs/.github/workflows/pr-titles.yml new file mode 100644 index 0000000..0c62fd3 --- /dev/null +++ b/js/videojs/.github/workflows/pr-titles.yml @@ -0,0 +1,22 @@ +name: PR title check + +on: + pull_request: + types: [opened, reopened, edited, synchronize] + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number }} + cancel-in-progress: true + +jobs: + pr-title-lint: + name: Should follow conventional commit spec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - run: npm i @actions/core @actions/github + - run: node .github/actions/pr-titles.mjs diff --git a/js/videojs/.github/workflows/release.yml b/js/videojs/.github/workflows/release.yml new file mode 100644 index 0000000..f87f9fe --- /dev/null +++ b/js/videojs/.github/workflows/release.yml @@ -0,0 +1,96 @@ +name: release +on: + push: + tags: + # match semver versions + - "v[0-9]+.[0-9]+.[0-9]+" + # match semver pre-releases + - "v[0-9]+.[0-9]+.[0-9]+-*" +jobs: + release: + env: + NETLIFY_BASE: 'videojs-preview.netlify.app' + runs-on: ubuntu-latest + permissions: + contents: write # Required for creating a release + discussions: write # Required for creating a release + id-token: write # Required for provenance + packages: write # Required for publishing + steps: + - name: Checkout + uses: actions/checkout@v3 + # We need to fetch the entire history as conventional-changelog needs + # access to any number of git commits to build the changelog. + with: + fetch-depth: 0 + + - name: read node version from .nvmrc + run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT + shell: bash + id: nvm + + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: '${{steps.nvm.outputs.NVMRC}}' + cache: npm + # this line is required for the setup-node action to be able to run the npm publish below. + registry-url: 'https://registry.npmjs.org' + + - name: npm install + run: npm i --prefer-offline --no-audit + + # publish runs build for us via a prepublishOnly script + - name: npm release + run: npm publish --provenance --tag next + + - name: get current changelog + run: node -e "console.log(require('./build/current-changelog.js')())" > CHANGELOG-LATEST.md + + - name: get dashed package version for netlify + run: echo "VERSION=$(node -e "process.stdout.write(require('./package.json').version.split('.').join('-'))")" >> $GITHUB_OUTPUT + id: get-version + shell: bash + if: env.NETLIFY_BASE != '' + + - name: add netlify preview to release notes + run: | + echo "" >> CHANGELOG-LATEST.md + echo "[netlify preview for this version](https://v${{steps.get-version.outputs.VERSION}}--${{env.NETLIFY_BASE}})" >> CHANGELOG-LATEST.md + if: env.NETLIFY_BASE != '' + + - name: Create Github release + uses: softprops/action-gh-release@v1 + with: + body_path: CHANGELOG-LATEST.md + token: ${{github.token}} + prerelease: true + files: dist/*.zip + discussion_category_name: Releases + + deploy: + needs: release + runs-on: ubuntu-latest + environment: Deploy + env: + VJS_VERSION: ${{ github.event.head_commit.message }} + S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + S3_ACCESS: ${{ secrets.AWS_S3_ACCESS }} + S3_KEY: ${{ secrets.AWS_S3_KEY }} + steps: + - name: setup node + uses: actions/setup-node@v3 + + - name: npm install video.js + run: npm install "video.js@$VJS_VERSION" + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_S3_SECRET }} + aws-region: us-east-1 + + - name: Copy files to the CDN with the AWS CLI + run: | + aws s3 cp node_modules/video.js/dist s3://${S3_BUCKET}/${S3_KEY}/${VJS_VERSION}/ --acl ${S3_ACCESS} --recursive |
