diff --git a/assets/images/help/codespaces/choose-branch-vscode.png b/assets/images/help/codespaces/choose-branch-vscode.png index b430d0e9339f..7a2b845f881d 100644 Binary files a/assets/images/help/codespaces/choose-branch-vscode.png and b/assets/images/help/codespaces/choose-branch-vscode.png differ diff --git a/assets/images/help/codespaces/choose-repository-vscode.png b/assets/images/help/codespaces/choose-repository-vscode.png index 5c530046fa30..4681fc384067 100644 Binary files a/assets/images/help/codespaces/choose-repository-vscode.png and b/assets/images/help/codespaces/choose-repository-vscode.png differ diff --git a/assets/images/help/codespaces/choose-sku-vscode.png b/assets/images/help/codespaces/choose-sku-vscode.png new file mode 100644 index 000000000000..09f23904cb1e Binary files /dev/null and b/assets/images/help/codespaces/choose-sku-vscode.png differ diff --git a/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png b/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png index 46a8ee5cf80c..3ef75e58ba9d 100644 Binary files a/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png and b/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png differ diff --git a/assets/images/help/codespaces/codespaces-header-vscode.png b/assets/images/help/codespaces/codespaces-header-vscode.png index 4f34f3abf8bf..490679f1a09c 100644 Binary files a/assets/images/help/codespaces/codespaces-header-vscode.png and b/assets/images/help/codespaces/codespaces-header-vscode.png differ diff --git a/assets/images/help/codespaces/create-codespace-vscode.png b/assets/images/help/codespaces/create-codespace-vscode.png index 2a27566d5eb9..091559925b17 100644 Binary files a/assets/images/help/codespaces/create-codespace-vscode.png and b/assets/images/help/codespaces/create-codespace-vscode.png differ diff --git a/assets/images/help/codespaces/delete-codespace-vscode.png b/assets/images/help/codespaces/delete-codespace-vscode.png index ac288111c465..d68fbf6a348c 100644 Binary files a/assets/images/help/codespaces/delete-codespace-vscode.png and b/assets/images/help/codespaces/delete-codespace-vscode.png differ diff --git a/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png b/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png index f68d7e6c41e4..94bb2e106d54 100644 Binary files a/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png and b/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png differ diff --git a/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png b/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png new file mode 100644 index 000000000000..6164cab61b97 Binary files /dev/null and b/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png differ diff --git a/assets/images/help/package-registry/package-creation-org-settings.png b/assets/images/help/package-registry/package-creation-org-settings.png index 99f50a9c90ee..a208215bb534 100644 Binary files a/assets/images/help/package-registry/package-creation-org-settings.png and b/assets/images/help/package-registry/package-creation-org-settings.png differ diff --git a/assets/images/help/package-registry/packages-overview-diagram.png b/assets/images/help/package-registry/packages-overview-diagram.png new file mode 100644 index 000000000000..257a406b44d9 Binary files /dev/null and b/assets/images/help/package-registry/packages-overview-diagram.png differ diff --git a/assets/images/help/settings/feature-preview-setting.png b/assets/images/help/settings/feature-preview-setting.png new file mode 100644 index 000000000000..0a86cfdb6a41 Binary files /dev/null and b/assets/images/help/settings/feature-preview-setting.png differ diff --git a/assets/images/help/settings/improved-container-support.png b/assets/images/help/settings/improved-container-support.png new file mode 100644 index 000000000000..f60e8e269722 Binary files /dev/null and b/assets/images/help/settings/improved-container-support.png differ diff --git a/content/actions/guides/building-and-testing-ruby.md b/content/actions/guides/building-and-testing-ruby.md new file mode 100644 index 000000000000..3a8fc3bb8985 --- /dev/null +++ b/content/actions/guides/building-and-testing-ruby.md @@ -0,0 +1,318 @@ +--- +title: Building and testing Ruby +intro: You can create a continuous integration (CI) workflow to build and test your Ruby project. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} + +### Introduction + +This guide shows you how to create a continuous integration (CI) workflow that builds and tests a Ruby application. If your CI tests pass, you may want to deploy your code or publish a gem. + +### Prerequisites + +We recommend that you have a basic understanding of Ruby, YAML, workflow configuration options, and how to create a workflow file. For more information, see: + +- [Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions) +- [Ruby in 20 minutes](https://www.ruby-lang.org/en/documentation/quickstart/) + +### Starting with the Ruby workflow template + +{% data variables.product.prodname_dotcom %} provides a Ruby workflow template that will work for most Ruby projects. For more information, see the [Ruby workflow template](https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml). + +To get started quickly, add the template to the `.github/workflows` directory of your repository. + +{% raw %} +```yaml +name: Ruby + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 + with: + ruby-version: 2.6 + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake +``` +{% endraw %} + +### Specifying the Ruby version + +The easiest way to specify a Ruby version is by using the `ruby/setup-ruby` action provided by the Ruby organization on GitHub. The action adds any supported Ruby version to `PATH` for each job run in a workflow. For more information see, the [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby). + +Using either Ruby's `ruby/setup-ruby` action or GitHub's `actions/setup-ruby` action is the recommended way of using Ruby with GitHub Actions because it ensures consistent behavior across different runners and different versions of Ruby. + +The `setup-ruby` action takes a Ruby version as an input and configures that version on the runner. + +{% raw %} +```yaml +steps: +- uses: actions/checkout@v2 +- uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 # Not needed with a .ruby-version file +- run: bundle install +- run: bundle exec rake +``` +{% endraw %} + +Alternatively, you can check a `.ruby-version` file into the root of your repository and `setup-ruby` will use the version defined in that file. + +### Testing with multiple versions of Ruby + +You can add a matrix strategy to run your workflow with more than one version of Ruby. For example, you can test your code against the latest patch releases of versions 2.7, 2.6, and 2.5. The 'x' is a wildcard character that matches the latest patch release available for a version. + +{% raw %} +```yaml +strategy: + matrix: + ruby-version: [2.7.x, 2.6.x, 2.5.x] +``` +{% endraw %} + +Each version of Ruby specified in the `ruby-version` array creates a job that runs the same steps. The {% raw %}`${{ matrix.ruby-version }}`{% endraw %} context is used to access the current job's version. For more information about matrix strategies and contexts, see "Workflow syntax for GitHub Actions" and "Context and expression syntax for GitHub Actions." + +The full updated workflow with a matrix strategy could look like this: + +{% raw %} +```yaml +name: Ruby CI + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: [2.7.x, 2.6.x, 2.5.x] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby-version }} + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake +``` +{% endraw %} + +### Installing dependencies with Bundler + +The `setup-ruby` action will automatically install bundler for you. The version is determined by your `gemfile.lock` file. If no version is present in your lockfile, then the latest compatible version will be installed. + +{% raw %} +```yaml +steps: +- uses: actions/checkout@v2 +- uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 +- run: bundle install +``` +{% endraw %} + +#### Caching dependencies + +The `setup-ruby` actions provides a method to automatically handle the caching of your gems between runs. + +To enable caching, set the following. + +{% raw %} +```yaml +steps: +- uses: ruby/setup-ruby@v1 + with: + bundler-cache: true +``` +{% endraw %} + +This will configure bundler to install your gems to `vendor/cache`. For each successful run of your workflow, this folder will be cached by Actions and re-downloaded for subsequent workflow runs. A hash of your gemfile.lock and the Ruby version are used as the cache key. If you install any new gems, or change a version, the cache will be invalidated and bundler will do a fresh install. + +**Caching without setup-ruby** + +For greater control over caching, you can use the `actions/cache` Action directly. For more information, see "[Caching dependencies to speed up your workflow](/actions/automating-your-workflow-with-github-actions/caching-dependencies-to-speed-up-workflows)." + +{% raw %} +```yaml +steps: +- uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- +- name: Bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 +``` +{% endraw %} + +If you're using a matrix build, you will want to include the matrix variables in your cache key. For example, if you have a matrix strategy for different ruby versions (`matrix.ruby-version`) and different operating systems (`matrix.os`), your workflow steps might look like this: + +{% raw %} +```yaml +steps: +- uses: actions/cache@v2 + with: + path: vendor/bundle + key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}- +- name: Bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 +``` +{% endraw %} + +### Matrix testing your code + +The following example matrix tests all stable releases and head versions of MRI, JRuby and TruffleRuby on Ubuntu and macOS. + +{% raw %} +```yaml +name: Matrix Testing + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + test: + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu, macos] + ruby: [2.5, 2.6, 2.7, head, debug, jruby, jruby-head, truffleruby, truffleruby-head] + continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - run: bundle install + - run: bundle exec rake +``` +{% endraw %} + +### Linting your code + +The following example installs `rubocop` and uses it to lint all files. For more information, see [Rubocop](https://github.com/rubocop-hq/rubocop). You can [configure Rubocop](https://docs.rubocop.org/rubocop/configuration.html) to decide on the specific linting rules. + +{% raw %} +```yaml +name: Linting + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 + - run: bundle install + - name: Rubocop + run: rubocop +``` +{% endraw %} + +### Publishing Gems + +You can configure your workflow to publish your Ruby package to any package registry you'd like when your CI tests pass. + +You can store any access tokens or credentials needed to publish your package using repository secrets. The following example creates and publishes a package to `GitHub Package Registry` and `RubyGems`. + +{% raw %} +```yaml + +name: Ruby Gem + +on: + # Manually publish + workflow_dispatch: + # Alternatively, publish whenever changes are merged to the default branch. + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + name: Build + Publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 2.6 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 + - run: bundle install + + - name: Publish to GPR + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec + gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem + env: + GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" + OWNER: ${{ github.repository_owner }} + + - name: Publish to RubyGems + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" +``` +{% endraw %} + diff --git a/content/actions/guides/index.md b/content/actions/guides/index.md index ed16f5d6226c..b428505073c4 100644 --- a/content/actions/guides/index.md +++ b/content/actions/guides/index.md @@ -31,6 +31,7 @@ You can use {% data variables.product.prodname_actions %} to create custom conti {% link_in_list /building-and-testing-nodejs %} {% link_in_list /building-and-testing-powershell %} {% link_in_list /building-and-testing-python %} +{% link_in_list /building-and-testing-ruby %} {% link_in_list /building-and-testing-java-with-maven %} {% link_in_list /building-and-testing-java-with-gradle %} {% link_in_list /building-and-testing-java-with-ant %} diff --git a/content/actions/index.md b/content/actions/index.md index 13725ec2b9c1..52be7ea9b848 100644 --- a/content/actions/index.md +++ b/content/actions/index.md @@ -79,7 +79,7 @@ versions:
{% octicon "search" width="24" %}

Sorry, there is no result for

It looks like we don't have an example that fits your filter.
Try another filter or add your code example

- Learn how to add a code example {% octicon "arrow-right" %} + Learn how to add a code example {% octicon "arrow-right" %} {% endif %} diff --git a/content/admin/enterprise-management/configuring-collectd.md b/content/admin/enterprise-management/configuring-collectd.md index 0482ad809a41..4196beb841db 100644 --- a/content/admin/enterprise-management/configuring-collectd.md +++ b/content/admin/enterprise-management/configuring-collectd.md @@ -10,7 +10,7 @@ versions: --- ### Set up an external `collectd` server -If you haven't already set up an external `collectd` server, you will need to do so before enabling `collectd` forwarding on {% data variables.product.product_location %}. Your `collectd` server must by running `collectd` version 5.x or higher. +If you haven't already set up an external `collectd` server, you will need to do so before enabling `collectd` forwarding on {% data variables.product.product_location %}. Your `collectd` server must be running `collectd` version 5.x or higher. 1. Log into your `collectd` server. 2. Create or edit the `collectd` configuration file to load the network plugin and populate the server and port directives with the proper values. On most distributions, this is located at `/etc/collectd/collectd.conf` diff --git a/content/admin/packages/configuring-third-party-storage-for-packages.md b/content/admin/packages/configuring-third-party-storage-for-packages.md index 8524547c00d7..0bbddf138396 100644 --- a/content/admin/packages/configuring-third-party-storage-for-packages.md +++ b/content/admin/packages/configuring-third-party-storage-for-packages.md @@ -21,7 +21,10 @@ For the best experience, we recommend using a dedicated bucket for {% data varia {% warning %} -**Warning:** Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}. +**Warnings:** +- It's critical you set the restrictive access policies you want for your storage bucket because {% data variables.product.company_short %} does not apply specific object permissions or additional access control lists (ACLs) to your storage bucket configuration. For example, if you make your bucket public, data in the bucket will be accessible on the public internet. For more information, see [Setting bucket and object access permissions](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/set-permissions.html) in the AWS Documentation. +- We recommend using a dedicated bucket for {% data variables.product.prodname_registry %}, separate from the bucket you use for {% data variables.product.prodname_actions %} storage. +- Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}. {% endwarning %} diff --git a/content/admin/packages/index.md b/content/admin/packages/index.md index d677721898a2..2c1a7b4d0c1f 100644 --- a/content/admin/packages/index.md +++ b/content/admin/packages/index.md @@ -1,6 +1,5 @@ --- title: Managing GitHub Packages for your enterprise -shortTitle: GitHub Packages intro: 'You can enable {% data variables.product.prodname_registry %} for your enterprise and manage {% data variables.product.prodname_registry %} settings and allowed packaged types.' redirect_from: - /enterprise/admin/packages diff --git a/content/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code.md b/content/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code.md index 93dc802d2bdb..065d9ded3098 100644 --- a/content/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code.md +++ b/content/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code.md @@ -1,6 +1,6 @@ --- title: Using Codespaces in Visual Studio Code -intro: 'You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_vs_codespaces %} extension with your account on {% data variables.product.product_name %}.' +intro: 'You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_github_codespaces %} extension with your account on {% data variables.product.product_name %}.' product: '{% data reusables.gated-features.codespaces %}' redirect_from: - /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code @@ -12,22 +12,16 @@ versions: ### Prerequisites -Before you can develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must configure the {% data variables.product.prodname_vs_codespaces %} extension to connect to your {% data variables.product.product_name %} account. +To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must sign into the {% data variables.product.prodname_github_codespaces %} extension. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later. -1. Use the {% data variables.product.prodname_vs %} Marketplace to install the [{% data variables.product.prodname_vs_codespaces %}](https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode %} documentation. -2. In {% data variables.product.prodname_vscode %}, in the left sidebar, click the Extensions icon. - ![The Extensions icon in {% data variables.product.prodname_vscode %}](/assets/images/help/codespaces/click-extensions-icon-vscode.png) -3. Below {% data variables.product.prodname_vs_codespaces %}, click the Manage icon, then click **Extension Settings**. - ![The Extension Settings option](/assets/images/help/codespaces/select-extension-settings.png) -4. Use the Codespaces: Account Provider drop-down menu, and click **{% data variables.product.prodname_dotcom %}**. - ![Setting the Account Provider to {% data variables.product.prodname_dotcom %}](/assets/images/help/codespaces/select-account-provider-vscode.png) +1. Use the {% data variables.product.prodname_vs %} Marketplace to install the [{% data variables.product.prodname_github_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode %} documentation. {% data reusables.codespaces.click-remote-explorer-icon-vscode %} -6. If {% data variables.product.prodname_codespaces %} is not already selected in the header, click **{% data variables.product.prodname_codespaces %}**. +2. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**. ![The {% data variables.product.prodname_codespaces %} header](/assets/images/help/codespaces/codespaces-header-vscode.png) -7. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**. +3. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**. ![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png) -8. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**. -9. Sign in to {% data variables.product.product_name %} to approve the extension. +4. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**. +5. Sign in to {% data variables.product.product_name %} to approve the extension. ### Creating a codespace in {% data variables.product.prodname_vscode %} @@ -38,9 +32,10 @@ After you connect your {% data variables.product.product_name %} account to the ![The Create new Codespace option in {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/create-codespace-vscode.png) 3. Type, then click the repository's name you want to develop in. ![Searching for repository to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-repository-vscode.png) -4. Click the branch you want to develop in. +4. Click the branch you want to develop on. ![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-branch-vscode.png) - +5. Click the instance type you want to develop in. +![Instance types for a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/choose-sku-vscode.png) ### Opening a codespace in {% data variables.product.prodname_vscode %} {% data reusables.codespaces.click-remote-explorer-icon-vscode %} diff --git a/content/github/getting-started-with-github/exploring-early-access-releases-with-feature-preview.md b/content/github/getting-started-with-github/exploring-early-access-releases-with-feature-preview.md index eecc80f816ed..caee1aa1ebf5 100644 --- a/content/github/getting-started-with-github/exploring-early-access-releases-with-feature-preview.md +++ b/content/github/getting-started-with-github/exploring-early-access-releases-with-feature-preview.md @@ -21,7 +21,6 @@ versions: You can see a list of features that are available in beta and a brief description for each feature. Each feature includes a link to give feedback. -1. In the upper-right corner of any page, click your profile photo, then click **Feature preview**. - ![Feature preview button](/assets/images/help/settings/feature-preview-button.png) +{% data reusables.feature-preview.feature-preview-setting %} 2. Optionally, to the right of a feature, click **Enable** or **Disable**. ![Enable button in feature preview](/assets/images/help/settings/enable-feature-button.png) diff --git a/content/github/setting-up-and-managing-your-enterprise/managing-licenses-for-visual-studio-subscription-with-github-enterprise.md b/content/github/setting-up-and-managing-your-enterprise/managing-licenses-for-visual-studio-subscription-with-github-enterprise.md index 8e06d2793439..83aa0c921dbf 100644 --- a/content/github/setting-up-and-managing-your-enterprise/managing-licenses-for-visual-studio-subscription-with-github-enterprise.md +++ b/content/github/setting-up-and-managing-your-enterprise/managing-licenses-for-visual-studio-subscription-with-github-enterprise.md @@ -3,6 +3,7 @@ title: Managing licenses for Visual Studio subscription with GitHub Enterprise intro: 'You can manage {% data variables.product.prodname_enterprise %} licensing for {% data variables.product.prodname_vss_ghe %}.' redirect_from: - /github/setting-up-and-managing-your-enterprise/managing-licenses-for-the-github-enterprise-and-visual-studio-bundle + - /github/setting-up-and-managing-your-enterprise-account/managing-licenses-for-the-github-enterprise-and-visual-studio-bundle - /github/articles/about-the-github-and-visual-studio-bundle - /articles/about-the-github-and-visual-studio-bundle - /github/setting-up-and-managing-your-enterprise-account/managing-licenses-for-visual-studio-subscription-with-github-enterprise diff --git a/content/github/site-policy/github-acceptable-use-policies.md b/content/github/site-policy/github-acceptable-use-policies.md index cda0c14d17f7..0ed0d7ec1384 100644 --- a/content/github/site-policy/github-acceptable-use-policies.md +++ b/content/github/site-policy/github-acceptable-use-policies.md @@ -37,6 +37,8 @@ While using the Service, under no circumstances will you: - harass, abuse, threaten, or incite violence towards any individual or group, including our employees, officers, and agents, or other users; +- post off-topic content, or interact with platform features, in a way that significantly or repeatedly disrupts the experience of other users; + - use our servers for any form of excessive automated bulk activity (for example, spamming or cryptocurrency mining), to place undue burden on our servers through automated means, or to relay any form of unsolicited advertising or solicitation through our servers, such as get-rich-quick schemes; - use our servers to disrupt or to attempt to disrupt, or to gain or to attempt to gain unauthorized access to, any service, device, data, account or network (unless authorized by the [GitHub Bug Bounty program](https://bounty.github.com)); @@ -48,15 +50,17 @@ While using the Service, under no circumstances will you: ### 4. Services Usage Limits You will not reproduce, duplicate, copy, sell, resell or exploit any portion of the Service, use of the Service, or access to the Service without our express written permission. -### 5. Scraping and API Usage Restrictions -Scraping refers to extracting data from our Service via an automated process, such as a bot or webcrawler. It does not refer to the collection of information through our API. Please see Section H of our [Terms of Service](/articles/github-terms-of-service#h-api-terms) for our API Terms. You may scrape the website for the following reasons: +### 5. Information Usage Restrictions +You may use information from our Service for the following reasons, regardless of whether the information was scraped, collected through our API, or obtained otherwise: + +- Researchers may use public, non-personal information from the Service for research purposes, only if any publications resulting from that research are [open access](https://en.wikipedia.org/wiki/Open_access). +- Archivists may use public information from the Service for archival purposes. -- Researchers may scrape public, non-personal information from the Service for research purposes, only if any publications resulting from that research are open access. -- Archivists may scrape the Service for public data for archival purposes. +Scraping refers to extracting information from our Service via an automated process, such as a bot or webcrawler. Scraping does not refer to the collection of information through our API. Please see Section H of our [Terms of Service](/articles/github-terms-of-service#h-api-terms) for our API Terms. -You may not scrape the Service for spamming purposes, including for the purposes of selling User Personal Information (as defined in the [GitHub Privacy Statement](/articles/github-privacy-statement)), such as to recruiters, headhunters, and job boards. +You may not use information from the Service (whether scraped, collected through our API, or obtained otherwise) for spamming purposes, including for the purposes of sending unsolicited emails to users or selling User Personal Information (as defined in the [GitHub Privacy Statement](/github/site-policy/github-privacy-statement)), such as to recruiters, headhunters, and job boards. -All use of data gathered through scraping must comply with the [GitHub Privacy Statement](/articles/github-privacy-statement). +Your use of information from the Service must comply with the [GitHub Privacy Statement](/github/site-policy/github-privacy-statement). ### 6. Privacy Misuse of User Personal Information is prohibited. diff --git a/content/github/site-policy/github-community-guidelines.md b/content/github/site-policy/github-community-guidelines.md index eb1d753aafc5..3e82aa45b7f4 100644 --- a/content/github/site-policy/github-community-guidelines.md +++ b/content/github/site-policy/github-community-guidelines.md @@ -11,7 +11,7 @@ Millions of developers host millions of projects on GitHub — both open and clo GitHub users worldwide bring wildly different perspectives, ideas, and experiences, and range from people who created their first "Hello World" project last week to the most well-known software developers in the world. We are committed to making GitHub a welcoming environment for all the different voices and perspectives in our community, while maintaining a space where people are free to express themselves. -We rely on our community members to communicate expectations, [moderate](#what-if-something-or-someone-offends-you) their projects, and {% data variables.contact.report_abuse %} or {% data variables.contact.report_content %}. We do not actively seek out content to moderate. By outlining what we expect to see within our community, we hope to help you understand how best to collaborate on GitHub, and what type of actions or content may violate our [Terms of Service](#legal-notices). We will investigate any abuse reports and may moderate public content on our site that we determine to be in violation of our Terms of Service. +We rely on our community members to communicate expectations, [moderate](#what-if-something-or-someone-offends-you) their projects, and {% data variables.contact.report_abuse %} or {% data variables.contact.report_content %}. By outlining what we expect to see within our community, we hope to help you understand how best to collaborate on GitHub, and what type of actions or content may violate our [Terms of Service](#legal-notices), which include our [Acceptable Use Policies](/github/site-policy/github-acceptable-use-policies). We will investigate any abuse reports and may moderate public content on our site that we determine to be in violation of our Terms of Service. ### Building a strong community @@ -48,23 +48,35 @@ Of course, you can always contact us to {% data variables.contact.report_abuse % We are committed to maintaining a community where users are free to express themselves and challenge one another's ideas, both technical and otherwise. Such discussions, however, are unlikely to foster fruitful dialog when ideas are silenced because community members are being shouted down or are afraid to speak up. That means you should be respectful and civil at all times, and refrain from attacking others on the basis of who they are. We do not tolerate behavior that crosses the line into the following: -* **Threats of violence** - You may not threaten violence towards others or use the site to organize, promote, or incite acts of real-world violence or terrorism. Think carefully about the words you use, the images you post, and even the software you write, and how they may be interpreted by others. Even if you mean something as a joke, it might not be received that way. If you think that someone else *might* interpret the content you post as a threat, or as promoting violence or terrorism, stop. Don't post it on GitHub. In extraordinary cases, we may report threats of violence to law enforcement if we think there may be a genuine risk of physical harm or a threat to public safety. +- #### Threats of violence + You may not threaten violence towards others or use the site to organize, promote, or incite acts of real-world violence or terrorism. Think carefully about the words you use, the images you post, and even the software you write, and how they may be interpreted by others. Even if you mean something as a joke, it might not be received that way. If you think that someone else *might* interpret the content you post as a threat, or as promoting violence or terrorism, stop. Don't post it on GitHub. In extraordinary cases, we may report threats of violence to law enforcement if we think there may be a genuine risk of physical harm or a threat to public safety. -* **Hate speech and discrimination** - While it is not forbidden to broach topics such as age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation, we do not tolerate speech that attacks a person or group of people on the basis of who they are. Just realize that when approached in an aggressive or insulting manner, these (and other) sensitive topics can make others feel unwelcome, or perhaps even unsafe. While there's always the potential for misunderstandings, we expect our community members to remain respectful and civil when discussing sensitive topics. +- #### Hate speech and discrimination + While it is not forbidden to broach topics such as age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation, we do not tolerate speech that attacks a person or group of people on the basis of who they are. Just realize that when approached in an aggressive or insulting manner, these (and other) sensitive topics can make others feel unwelcome, or perhaps even unsafe. While there's always the potential for misunderstandings, we expect our community members to remain respectful and civil when discussing sensitive topics. -* **Bullying and harassment** - We do not tolerate bullying or harassment. This means any habitual badgering or intimidation targeted at a specific person or group of people. In general, if your actions are unwanted and you continue to engage in them, there's a good chance you are headed into bullying or harassment territory. +- #### Bullying and harassment + We do not tolerate bullying or harassment. This means any habitual badgering or intimidation targeted at a specific person or group of people. In general, if your actions are unwanted and you continue to engage in them, there's a good chance you are headed into bullying or harassment territory. -* **Impersonation** - You may not seek to mislead others as to your identity by copying another person's avatar, posting content under their email address, using a similar username or otherwise posing as someone else. Impersonation is a form of harassment. +- #### Disrupting the experience of other users + Being part of a community includes recognizing how your behavior affects others and engaging in meaningful and productive interactions with people and the platform they rely on. Behaviors such as repeatedly posting off-topic comments, opening empty or meaningless issues or pull requests, or using any other platform feature in a way that continually disrupts the experience of other users are not allowed. While we encourage maintainers to moderate their own projects on an individual basis, GitHub staff may take further restrictive action against accounts that are engaging in these types of behaviors. -* **Doxxing and invasion of privacy** - Don't post other people's personal information, such as phone numbers, private email addresses, physical addresses, credit card numbers, Social Security/National Identity numbers, or passwords. Depending on the context, such as in the case of intimidation or harassment, we may consider other information, such as photos or videos that were taken or distributed without the subject's consent, to be an invasion of privacy, especially when such material presents a safety risk to the subject. +- #### Impersonation + You may not seek to mislead others as to your identity by copying another person's avatar, posting content under their email address, using a similar username or otherwise posing as someone else. Impersonation is a form of harassment. -* **Sexually obscene content** - Don’t post content that is pornographic. This does not mean that all nudity, or all code and content related to sexuality, is prohibited. We recognize that sexuality is a part of life and non-pornographic sexual content may be a part of your project, or may be presented for educational or artistic purposes. We do not allow obscene sexual content or content that may involve the exploitation or sexualization of minors. +- #### Doxxing and invasion of privacy + Don't post other people's personal information, such as personal, private email addresses, phone numbers, physical addresses, credit card numbers, Social Security/National Identity numbers, or passwords. Depending on the context, such as in the case of intimidation or harassment, we may consider other information, such as photos or videos that were taken or distributed without the subject's consent, to be an invasion of privacy, especially when such material presents a safety risk to the subject. -* **Gratuitously violent content** - Don’t post violent images, text, or other content without reasonable context or warnings. While it's often okay to include violent content in video games, news reports, and descriptions of historical events, we do not allow violent content that is posted indiscriminately, or that is posted in a way that makes it difficult for other users to avoid (such as a profile avatar or an issue comment). A clear warning or disclaimer in other contexts helps users make an educated decision as to whether or not they want to engage with such content. +- #### Sexually obscene content + Don’t post content that is pornographic. This does not mean that all nudity, or all code and content related to sexuality, is prohibited. We recognize that sexuality is a part of life and non-pornographic sexual content may be a part of your project, or may be presented for educational or artistic purposes. We do not allow obscene sexual content or content that may involve the exploitation or sexualization of minors. -* **Misinformation and disinformation** - You may not post content that presents a distorted view of reality, whether it is inaccurate or false (misinformation) or is intentionally deceptive (disinformation) because such content is likely to result in harm to the public or to interfere with fair and equal opportunities for all to participate in public life. For example, we do not allow content that may put the well-being of groups of people at risk or limit their ability to take part in a free and open society. We encourage active participation in the expression of ideas, perspectives, and experiences and may not be in a position to dispute personal accounts or observations. We generally allow parody and satire that is in line with our Acceptable Use Polices, and we consider context to be important in how information is received and understood; therefore, it may be appropriate to clarify your intentions via disclaimers or other means, as well as the source(s) of your information. +- #### Gratuitously violent content + Don’t post violent images, text, or other content without reasonable context or warnings. While it's often okay to include violent content in video games, news reports, and descriptions of historical events, we do not allow violent content that is posted indiscriminately, or that is posted in a way that makes it difficult for other users to avoid (such as a profile avatar or an issue comment). A clear warning or disclaimer in other contexts helps users make an educated decision as to whether or not they want to engage with such content. -* **Active malware or exploits** - Being part of a community includes not taking advantage of other members of the community. We do not allow anyone to use our platform for exploit delivery, such as using GitHub as a means to deliver malicious executables, or as attack infrastructure, for example by organizing denial of service attacks or managing command and control servers. Note, however, that we do not prohibit the posting of source code which could be used to develop malware or exploits, as the publication and distribution of such source code has educational value and provides a net benefit to the security community. +- #### Misinformation and disinformation + You may not post content that presents a distorted view of reality, whether it is inaccurate or false (misinformation) or is intentionally deceptive (disinformation) where such content is likely to result in harm to the public or to interfere with fair and equal opportunities for all to participate in public life. For example, we do not allow content that may put the well-being of groups of people at risk or limit their ability to take part in a free and open society. We encourage active participation in the expression of ideas, perspectives, and experiences and may not be in a position to dispute personal accounts or observations. We generally allow parody and satire that is in line with our Acceptable Use Polices, and we consider context to be important in how information is received and understood; therefore, it may be appropriate to clarify your intentions via disclaimers or other means, as well as the source(s) of your information. + +- #### Active malware or exploits + Being part of a community includes not taking advantage of other members of the community. We do not allow anyone to use our platform for exploit delivery, such as using GitHub as a means to deliver malicious executables, or as attack infrastructure, for example by organizing denial of service attacks or managing command and control servers. Note, however, that we do not prohibit the posting of source code which could be used to develop malware or exploits, as the publication and distribution of such source code has educational value and provides a net benefit to the security community. ### What happens if someone breaks the rules? diff --git a/content/github/site-policy/github-corporate-terms-of-service.md b/content/github/site-policy/github-corporate-terms-of-service.md index d0abab6b9f1d..4f25d5d53e1b 100644 --- a/content/github/site-policy/github-corporate-terms-of-service.md +++ b/content/github/site-policy/github-corporate-terms-of-service.md @@ -10,7 +10,7 @@ THANK YOU FOR CHOOSING GITHUB FOR YOUR COMPANY’S BUSINESS NEEDS. PLEASE READ T BY CLICKING ON THE "I AGREE" OR SIMILAR BUTTON OR BY ACCESSING THE PRODUCTS, CUSTOMER ACCEPTS ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF CUSTOMER IS ENTERING INTO THIS AGREEMENT ON BEHALF OF A COMPANY OR OTHER LEGAL ENTITY, CUSTOMER REPRESENTS THAT IT HAS THE LEGAL AUTHORITY TO BIND THE COMPANY OR OTHER LEGAL ENTITY TO THIS AGREEMENT. ### GitHub Corporate Terms of Service -Version Effective Date: July 20, 2020 +Version Effective Date: November 16, 2020 This Agreement applies to the following GitHub offerings, as further defined below (collectively, the **“Products”**): - The Service; @@ -135,14 +135,14 @@ Customer retains ownership of Customer Content that Customer creates or owns. Cu Customer grants the rights set forth in Sections D.3 through D.6, free of charge and for the purposes identified in those sections until such time as Customer removes Customer Content from GitHub servers, except for Content Customer has posted publicly and that External Users have Forked, in which case the license is perpetual until such time as all Forks of Customer Content have been removed from GitHub servers. If Customer uploads Customer Content that already comes with a license granting GitHub the permissions it needs to run the Service, no additional license is required. #### 3. License Grant to Us -Customer grants to GitHub the right to store, parse, and display Customer Content, and make incidental copies only as necessary to provide the Service. This includes the right to copy Customer Content to GitHub's database and make backups; display Customer Content to Customer and those to whom Customer chooses to show it; parse Customer Content into a search index or otherwise analyze it on GitHub's servers; share Customer Content with External Users with whom Customer chooses to share it; and perform Customer Content, in case it is something like music or video. These rights apply to both public and Private Repositories. This license does not grant GitHub the right to sell Customer Content or otherwise distribute or use it outside of the Service. Customer grants to GitHub the rights it needs to use Customer Content without attribution and to make reasonable adaptations of Customer Content as necessary to provide the Service. +Customer grants to GitHub the right to store, archive, parse, and display Customer Content, and make incidental copies, only as necessary to provide the Service, including improving the Service over time. This license includes the right to copy Customer Content to GitHub's database and make backups; display Customer Content to Customer and those to whom Customer chooses to show it; parse Customer Content into a search index or otherwise analyze it on GitHub's servers; share Customer Content with External Users with whom Customer chooses to share it; and perform Customer Content, in case it is something like music or video. These rights apply to both public and Private Repositories. This license does not grant GitHub the right to sell Customer Content. It also does not grant GitHub the right to otherwise distribute or use Customer Content outside of our provision of the Service, except that as part of the right to archive Customer Content, GitHub may permit our partners to store and archive Customer Content in public repositories in connection with the GitHub Arctic Code Vault and GitHub Archive Program. Customer grants to GitHub the rights it needs to use Customer Content without attribution and to make reasonable adaptations of Customer Content as necessary to provide the Service. #### 4. License Grant to External Users Any Content that Customer posts publicly, including issues, comments, and contributions to External Users' repositories, may be viewed by others. By setting its repositories to be viewed publicly, Customer agree to allow External Users to view and Fork Customer’s repositories. If Customer sets its pages and repositories to be viewed publicly, Customer grants to External Users a nonexclusive, worldwide license to use, display, and perform Customer Content through the Service and to reproduce Customer Content solely on the Service as permitted through functionality provided by GitHub (for example, through Forking). Customer may grant further rights to Customer Content if Customer adopts a license. If Customer is uploading Customer Content that it did not create or own, Customer is responsible for ensuring that the Customer Content it uploads is licensed under terms that grant these permissions to External Users #### 5. Contributions Under Repository License -Whenever Customer makes a contribution to a repository containing notice of a license, it licenses such contributions under the same terms and agrees that it has the right to license such contributions under those terms. If Customer has a separate agreement to license its contributions under different terms, such as a contributor license agreement, that agreement will supersede. +Whenever Customer adds Content to a repository containing notice of a license, it licenses that Content under the same terms and agrees that it has the right to license that Content under those terms. If Customer has a separate agreement to license that Content under different terms, such as a contributor license agreement, that agreement will supersede. #### 6. Moral Rights Customer retains all moral rights to Customer Content that it uploads, publishes, or submits to any part of the Service, including the rights of integrity and attribution. However, Customer waives these rights and agrees not to assert them against GitHub, solely to enable GitHub to reasonably exercise the rights granted in Section D, but not otherwise. @@ -156,10 +156,13 @@ Customer is responsible for managing access to its Private Repositories, includi GitHub considers Customer Content in Customer’s Private Repositories to be Customer’s Confidential Information. GitHub will protect and keep strictly confidential the Customer Content of Private Repositories in accordance with Section P. #### 3. Access -GitHub personnel may only access Customer’s Private Repositories (i) with Customer’s consent and knowledge, for support reasons or (ii) when access is required for security reasons. Customer may choose to enable additional access to its Private Repositories. For example, Customer may enable various GitHub services or features that require additional rights to Customer Content in Private Repositories. These rights may vary depending on the service or feature, but GitHub will continue to treat Customer Content in Customer’s Private Repositories as Customer’s Confidential Information. If those services or features require rights in addition to those it needs to provide the Service, GitHub will provide an explanation of those rights. +GitHub personnel may only access Customer's Private Repositories in the situations described in our [Privacy Statement](/github/site-policy/github-privacy-statement#repository-contents). -#### 4. Exclusions -If GitHub has reason to believe the Content of a Private Repository is in violation of the law or of this Agreement, GitHub has the right to access, review, and remove that Content. Additionally, GitHub may be [compelled by law](/github/site-policy/github-privacy-statement#for-legal-disclosure) to disclose the Content of Customer’s Private Repositories. Unless otherwise bound by requirements under law or if in response to a security threat or other risk to security, GitHub will provide notice of such actions. +Customer may choose to enable additional access to its Private Repositories. For example, Customer may enable various GitHub services or features that require additional rights to Customer Content in Private Repositories. These rights may vary depending on the service or feature, but GitHub will continue to treat Customer Content in Customer’s Private Repositories as Customer’s Confidential Information. If those services or features require rights in addition to those it needs to provide the Service, GitHub will provide an explanation of those rights. + +Additionally, we may be [compelled by law](/github/site-policy/github-privacy-statement#for-legal-disclosure) to disclose the contents of your private repositories. + +GitHub will provide notice regarding our access to private repository content, unless [for legal disclosure](/github/site-policy/github-privacy-statement#for-legal-disclosure), to comply with our legal obligations, or where otherwise bound by requirements under law, for automated scanning, or if in response to a security threat or other risk to security. ### F. Intellectual Property Notice @@ -273,7 +276,7 @@ Neither Party will use the other Party's Confidential Information, except as per Upon Customer’s request for Professional Services, GitHub will provide an SOW detailing such Professional Services. GitHub will perform the Professional Services described in each SOW. GitHub will control the manner and means by which the Professional Services are performed and reserves the right to determine personnel assigned. GitHub may use third parties to perform the Professional Services, provided that GitHub remains responsible for their acts and omissions. Customer acknowledges and agrees that GitHub retains all right, title and interest in and to anything used or developed in connection with performing the Professional Services, including software, tools, specifications, ideas, concepts, inventions, processes, techniques, and know-how. To the extent GitHub delivers anything to Customer while performing the Professional Services, GitHub grants to Customer a non-exclusive, non-transferable, worldwide, royalty-free, limited-term license to use those deliverables during the term of this Agreement, solely in conjunction with Customer’s use of the Service. ### R. Changes to the Service or Terms -GitHub reserves the right, at its sole discretion, to amend this Agreement at any time and will update this Agreement in the event of any such amendments. GitHub will notify Customer of material changes to this Agreement, such as price changes, at least 30 days prior to the change taking effect by posting a notice on the Service. For non-material modifications, Customer's continued use of the Service constitutes agreement to our revisions of this Agreement. Customer can view all changes to this Agreement in our [Site Policy](https://github.com/github/site-policy) repository. +GitHub reserves the right, at its sole discretion, to amend this Agreement at any time and will update this Agreement in the event of any such amendments. GitHub will notify Customer of material changes to this Agreement, such as price increases, at least 30 days prior to the change taking effect by posting a notice on the Service or sending email to the primary email address specified in your GitHub account. Customer's continued use of the Service after those 30 days constitutes agreement to those revisions of this Agreement. For any other modifications, Customer's continued use of the Service constitutes agreement to our revisions of this Agreement. Customer can view all changes to this Agreement in our [Site Policy](https://github.com/github/site-policy) repository. GitHub changes the Service via Updates and addition of new features. Nothwithstanding the foregoing, GitHub reserves the right at any time to modify or discontinue, temporarily or permanently, the Service (or any part of it) with or without notice. diff --git a/content/github/site-policy/github-enterprise-service-level-agreement.md b/content/github/site-policy/github-enterprise-service-level-agreement.md index 7b7d630df41d..8581290ff72a 100644 --- a/content/github/site-policy/github-enterprise-service-level-agreement.md +++ b/content/github/site-policy/github-enterprise-service-level-agreement.md @@ -25,6 +25,6 @@ For definitions of each Service feature (“**Service Feature**”) and to revi Excluded from the Uptime Calculation are Service Feature failures resulting from (i) Customer’s acts, omissions, or misuse of the Service including violations of the Agreement; (ii) failure of Customer’s internet connectivity; (iii) factors outside GitHub's reasonable control, including force majeure events; or (iv) Customer’s equipment, services, or other technology. ## Service Credits Redemption -If GitHub does not meet this SLA, Customer may redeem Service Credits only upon written request to GitHub within thirty (30) days of the end of the calendar quarter. Written requests for Service Credits redemption should be sent to [GitHub Support](https://support.github.com/contact). +If GitHub does not meet this SLA, Customer may redeem Service Credits only upon written request to GitHub within thirty (30) days of the end of the calendar quarter. Written requests for Service Credits redemption and GitHub Enterprise Cloud custom monthly or quarterly reports should be sent to [GitHub Support](https://support.github.com/contact). Service Credits may take the form of a refund or credit to Customer’s account, cannot be exchanged into a cash amount, are limited to a maximum of ninety (90) days of paid service per calendar quarter, require Customer to have paid any outstanding invoices, and expire upon termination of Customer’s agreement with GitHub. Service Credits are the sole and exclusive remedy for any failure by GitHub to meet any obligations in this SLA. diff --git a/content/github/site-policy/github-enterprise-subscription-agreement.md b/content/github/site-policy/github-enterprise-subscription-agreement.md index f7dd7bff7b43..18a526e52aff 100644 --- a/content/github/site-policy/github-enterprise-subscription-agreement.md +++ b/content/github/site-policy/github-enterprise-subscription-agreement.md @@ -7,7 +7,7 @@ versions: free-pro-team: '*' --- -Version Effective Date: July 20, 2020 +Version Effective Date: November 16, 2020 BY CLICKING THE "I AGREE" OR SIMILAR BUTTON OR BY USING ANY OF THE PRODUCTS (DEFINED BELOW), CUSTOMER ACCEPTS THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF CUSTOMER IS ENTERING INTO THIS AGREEMENT ON BEHALF OF A LEGAL ENTITY, CUSTOMER REPRESENTS THAT IT HAS THE LEGAL AUTHORITY TO BIND THE LEGAL ENTITY TO THIS AGREEMENT. @@ -197,7 +197,7 @@ This Agreement, together with the Exhibits and each Order Form and SOW, constitu #### 1.13.11 Amendments; Order of Precedence. -GitHub reserves the right, at its sole discretion, to amend this Agreement at any time and will update this Agreement in the event of any such amendments. GitHub will notify Customer of material changes to this Agreement, such as price changes, at least 30 days prior to the change taking effect by posting a notice on the Service. For non-material modifications, Customer's continued use of the Service constitutes agreement to our revisions of this Agreement. Customer can view all changes to this Agreement in our [Site Policy](https://github.com/github/site-policy) repository. In the event of any conflict between the terms of this Agreement and any Order Form or SOW, the terms of the Order Form or SOW will control with respect to that Order Form or SOW only. +GitHub reserves the right, at its sole discretion, to amend this Agreement at any time and will update this Agreement in the event of any such amendments. GitHub will notify Customer of material changes to this Agreement, such as price increases, at least 30 days prior to the change taking effect by posting a notice on the Service or sending email to the primary email address specified in your GitHub account. Customer's continued use of the Service after those 30 days constitutes agreement to those revisions of this Agreement. For any other modifications, Customer's continued use of the Service constitutes agreement to our revisions of this Agreement. Customer can view all changes to this Agreement in our [Site Policy](https://github.com/github/site-policy) repository. In the event of any conflict between the terms of this Agreement and any Order Form or SOW, the terms of the Order Form or SOW will control with respect to that Order Form or SOW only. #### 1.13.12 Severability. @@ -296,7 +296,7 @@ Customer may create or upload User-Generated Content while using the Service. Cu **(ii)** Customer grants the rights set forth in Sections 3.3.3 through 3.3.6, free of charge and for the purposes identified in those sections until such time as Customer removes Customer Content from GitHub servers, except for Content Customer has posted publicly and that External Users have Forked, in which case the license is perpetual until such time as all Forks of Customer Content have been removed from GitHub servers. If Customer uploads Customer Content that already comes with a license granting GitHub the permissions it needs to run the Service, no additional license is required. #### 3.3.3 License Grant to GitHub. -Customer grants to GitHub the right to store, parse, and display Customer Content, and make incidental copies only as necessary to provide the Service. This includes the right to copy Customer Content to GitHub's database and make backups; display Customer Content to Customer and those to whom Customer chooses to show it; parse Customer Content into a search index or otherwise analyze it on GitHub's servers; share Customer Content with External Users with whom Customer chooses to share it; and perform Customer Content, in case it is something like music or video. These rights apply to both public and Private Repositories. This license does not grant GitHub the right to sell Customer Content or otherwise distribute or use it outside of the Service. Customer grants to GitHub the rights it needs to use Customer Content without attribution and to make reasonable adaptations of Customer Content as necessary to provide the Service. +Customer grants to GitHub the right to store, parse, and display Customer Content, and make incidental copies, only as necessary to provide the Service. This includes the right to copy Customer Content to GitHub's database and make backups; display Customer Content to Customer and those to whom Customer chooses to show it; parse Customer Content into a search index or otherwise analyze it on GitHub's servers; share Customer Content with External Users with whom Customer chooses to share it; and perform Customer Content, in case it is something like music or video. These rights apply to both public and Private Repositories. This license does not grant GitHub the right to sell Customer Content or otherwise distribute or use it outside of the Service. Customer grants to GitHub the rights it needs to use Customer Content without attribution and to make reasonable adaptations of Customer Content as necessary to provide the Service. #### 3.3.4 License Grant to External Users. **(i)** Any Content that Customer posts publicly, including issues, comments, and contributions to External Users' repositories, may be viewed by others. By setting its repositories to be viewed publicly, Customer agree to allow External Users to view and Fork Customer’s repositories. @@ -318,10 +318,13 @@ Customer is responsible for managing access to its Private Repositories, includi GitHub considers Customer Content in Customer’s Private Repositories to be Customer’s Confidential Information. GitHub will protect and keep strictly confidential the Customer Content of Private Repositories in accordance with Section 1.4. #### 3.4.3 Access. -GitHub may only access Customer’s Private Repositories (i) with Customer’s consent and knowledge, for support reasons, or (ii) when access is required for security reasons. Customer may choose to enable additional access to its Private Repositories. For example, Customer may enable various GitHub services or features that require additional rights to Customer Content in Private Repositories. These rights may vary depending on the service or feature, but GitHub will continue to treat Customer Content in Customer’s Private Repositories as Customer’s Confidential Information. If those services or features require rights in addition to those it needs to provide the Service, GitHub will provide an explanation of those rights. +GitHub personnel may only access Customer’s Private Repositories in the situations described in our [Privacy Statement](/github/site-policy/github-privacy-statement#repository-contents). -#### 3.4.4 Exclusions. -If GitHub has reason to believe the Content of a Private Repository is in violation of the law or of this Agreement, GitHub has the right to access, review, and remove that Content. Additionally, GitHub may be compelled by law to disclose the Content of Customer’s Private Repositories. Unless otherwise bound by requirements under law or if in response to a security threat or other risk to security, GitHub will provide notice of such actions. +Customer may choose to enable additional access to its Private Repositories. For example, Customer may enable various GitHub services or features that require additional rights to Customer Content in Private Repositories. These rights may vary depending on the service or feature, but GitHub will continue to treat Customer Content in Customer’s Private Repositories as Customer’s Confidential Information. If those services or features require rights in addition to those it needs to provide the Service, GitHub will provide an explanation of those rights. + +Additionally, we may be [compelled by law](/github/site-policy/github-privacy-statement#for-legal-disclosure) to disclose the contents of your private repositories. + +GitHub will provide notice regarding our access to private repository content, unless [for legal disclosure](/github/site-policy/github-privacy-statement#for-legal-disclosure), to comply with our legal obligations, or where otherwise bound by requirements under law, for automated scanning, or if in response to a security threat or other risk to security. ### 3.5. Intellectual Property Notices. diff --git a/content/github/site-policy/github-privacy-statement.md b/content/github/site-policy/github-privacy-statement.md index 81ff6378d189..416addd309dc 100644 --- a/content/github/site-policy/github-privacy-statement.md +++ b/content/github/site-policy/github-privacy-statement.md @@ -11,7 +11,7 @@ versions: free-pro-team: '*' --- -Effective date: October 2, 2020 +Effective date: November 16, 2020 Thanks for entrusting GitHub Inc. (“GitHub”, “we”) with your source code, your projects, and your personal information. Holding on to your private information is a serious responsibility, and we want you to know how we're handling it. @@ -150,23 +150,39 @@ We **do not** sell your User Personal Information for monetary or other consider Please note: The California Consumer Privacy Act of 2018 (“CCPA”) requires businesses to state in their privacy policy whether or not they disclose personal information in exchange for monetary or other valuable consideration. While CCPA only covers California residents, we voluntarily extend its core rights for people to control their data to _all_ of our users, not just those who live in California. You can learn more about the CCPA and how we comply with it [here](/github/site-policy/githubs-notice-about-the-california-consumer-privacy-act). -### Other important information +### Repository contents + +#### Access to private repositories + +If your repository is private, you control the access to your Content. If you include User Personal Information or Sensitive Personal Information, that information may only be accessible to GitHub in accordance with this Privacy Statement. GitHub personnel [do not access private repository content](/github/site-policy/github-terms-of-service#e-private-repositories) except for +- security purposes +- to assist the repository owner with a support matter +- to maintain the integrity of the Service +- to comply with our legal obligations +- if we have reason to believe the contents are in violation of the law, or +- with your consent. + +However, while we do not generally search for content in your repositories, we may scan our servers and content to detect certain tokens or security signatures, known active malware, known vulnerabilities in dependencies, or other content known to violate our Terms of Service, such as violent extremist or terrorist content or child exploitation imagery, based on algorithmic fingerprinting techniques (collectively, "automated scanning"). Our Terms of Service provides more details on [private repositories](/github/site-policy/github-terms-of-service#e-private-repositories). -#### Repository contents +Please note, you may choose to disable certain access to your private repositories that is enabled by default as part of providing you with the Service (for example, automated scanning needed to enable Dependency Graph and Dependabot alerts). -GitHub personnel [do not access private repositories unless required to](/github/site-policy/github-terms-of-service#e-private-repositories) for security purposes, to assist the repository owner with a support matter, to maintain the integrity of the Service, or to comply with our legal obligations. However, while we do not generally search for content in your repositories, we may scan our servers and content to detect certain tokens or security signatures, known active malware, or other content known to violate our Terms, such as violent extremist or terrorist content or child exploitation imagery based on algorithmic fingerprinting techniques. Our Terms of Service provides [more details](/github/site-policy/github-terms-of-service#e-private-repositories). +GitHub will provide notice regarding our access to private repository content, unless [for legal disclosure](/github/site-policy/github-privacy-statement#for-legal-disclosure), to comply with our legal obligations, or where otherwise bound by requirements under law, for automated scanning, or if in response to a security threat or other risk to security. -If your repository is public, anyone may view its contents. If you include private, confidential or [Sensitive Personal Information](https://gdpr-info.eu/art-9-gdpr/), such as email addresses or passwords, in your public repository, that information may be indexed by search engines or used by third parties. +#### Public repositories + +If your repository is public, anyone may view its contents. If you include User Personal Information, [Sensitive Personal Information](https://gdpr-info.eu/art-9-gdpr/), or confidential information, such as email addresses or passwords, in your public repository, that information may be indexed by search engines or used by third parties. Please see more about [User Personal Information in public repositories](/github/site-policy/github-privacy-statement#public-information-on-github). +### Other important information + #### Public information on GitHub Many of GitHub services and features are public-facing. If your content is public-facing, third parties may access and use it in compliance with our Terms of Service, such as by viewing your profile or repositories or pulling data via our API. We do not sell that content; it is yours. However, we do allow third parties, such as research organizations or archives, to compile public-facing GitHub information. Other third parties, such as data brokers, have been known to scrape GitHub and compile data as well. Your User Personal Information associated with your content could be gathered by third parties in these compilations of GitHub data. If you do not want your User Personal Information to appear in third parties’ compilations of GitHub data, please do not make your User Personal Information publicly available and be sure to [configure your email address to be private in your user profile](https://github.com/settings/emails) and in your [git commit settings](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address). We currently set Users' email address to private by default, but legacy GitHub Users may need to update their settings. -If you would like to compile GitHub data, you must comply with our Terms of Service regarding [scraping](/github/site-policy/github-acceptable-use-policies#5-scraping-and-api-usage-restrictions) and [privacy](/github/site-policy/github-acceptable-use-policies#6-privacy), and you may only use any public-facing User Personal Information you gather for the purpose for which our user authorized it. For example, where a GitHub user has made an email address public-facing for the purpose of identification and attribution, do not use that email address for commercial advertising. We expect you to reasonably secure any User Personal Information you have gathered from GitHub, and to respond promptly to complaints, removal requests, and "do not contact" requests from GitHub or GitHub users. +If you would like to compile GitHub data, you must comply with our Terms of Service regarding [information usage](/github/site-policy/github-acceptable-use-policies#5-information-usage-restrictions) and [privacy](/github/site-policy/github-acceptable-use-policies#6-privacy), and you may only use any public-facing User Personal Information you gather for the purpose for which our user authorized it. For example, where a GitHub user has made an email address public-facing for the purpose of identification and attribution, do not use that email address for the purposes of sending unsolicited emails to users or selling User Personal Information, such as to recruiters, headhunters, and job boards, or for commercial advertising. We expect you to reasonably secure any User Personal Information you have gathered from GitHub, and to respond promptly to complaints, removal requests, and "do not contact" requests from GitHub or GitHub users. Similarly, projects on GitHub may include publicly available User Personal Information collected as part of the collaborative process. If you have a complaint about any User Personal Information on GitHub, please see our section on [resolving complaints](/github/site-policy/github-privacy-statement#resolving-complaints). @@ -219,7 +235,7 @@ That said, the email address you have supplied [via your Git commit settings](/g #### Cookies -GitHub uses cookies and similar technologies (collectively, “cookies”) to make interactions with our service easy and meaningful. Cookies are small text files that websites often store on computer hard drives or mobile devices of visitors. We use cookies to provide you our services, for example, to keep you logged in, remember your preferences, identify your device for security purposes, and provide information for future development of GitHub. By using our Website, you agree that we can place these types of cookies on your computer or device. If you disable your browser or device’s ability to accept these cookies, you will not be able to log in or use GitHub’s services. +GitHub uses cookies and similar technologies (e.g., HTML5 localStorage) to make interactions with our service easy and meaningful. Cookies are small text files that websites often store on computer hard drives or mobile devices of visitors. We use cookies and similar technologies (hereafter collectively "cookies") to provide you our services, for example, to keep you logged in, remember your preferences, identify your device for security purposes, and provide information for future development of GitHub. By using our Website, you agree that we can place these types of cookies on your computer or device. If you disable your browser or device’s ability to accept these cookies, you will not be able to log in or use GitHub’s services. We provide more information about [cookies on GitHub](/github/site-policy/github-subprocessors-and-cookies#cookies-on-github) on our [GitHub Subprocessors and Cookies](/github/site-policy/github-subprocessors-and-cookies) page that describes the cookies we set, the needs we have for those cookies, and the expiration of such cookies. It also lists our third-party analytics providers and how you can control your cookie preference settings for such cookies. @@ -300,7 +316,7 @@ In the unlikely event that a dispute arises between you and GitHub regarding our ### Changes to our Privacy Statement -Although most changes are likely to be minor, GitHub may change our Privacy Statement from time to time. We will provide notification to Users of material changes to this Privacy Statement through our Website at least 30 days prior to the change taking effect by posting a notice on our home page or sending email to the primary email address specified in your GitHub account. We will also update our [Site Policy repository](https://github.com/github/site-policy/), which tracks all changes to this policy. For changes to this Privacy Statement that are not material changes or that do not affect your rights, we encourage Users to check our Site Policy repository frequently. +Although most changes are likely to be minor, GitHub may change our Privacy Statement from time to time. We will provide notification to Users of material changes to this Privacy Statement through our Website at least 30 days prior to the change taking effect by posting a notice on our home page or sending email to the primary email address specified in your GitHub account. We will also update our [Site Policy repository](https://github.com/github/site-policy/), which tracks all changes to this policy. For other changes to this Privacy Statement, we encourage Users to [watch](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions#configuring-your-watch-settings-for-an-individual-repository) or to check our Site Policy repository frequently. ### License diff --git a/content/github/site-policy/github-terms-of-service.md b/content/github/site-policy/github-terms-of-service.md index 368578fb34bf..db3a28ec38d2 100644 --- a/content/github/site-policy/github-terms-of-service.md +++ b/content/github/site-policy/github-terms-of-service.md @@ -32,11 +32,11 @@ Thank you for using GitHub! We're happy you're here. Please read this Terms of S | [N. Disclaimer of Warranties](#n-disclaimer-of-warranties) | We provide our service as is, and we make no promises or guarantees about this service. **Please read this section carefully; you should understand what to expect.** | | [O. Limitation of Liability](#o-limitation-of-liability) | We will not be liable for damages or losses arising from your use or inability to use the service or otherwise arising under this agreement. **Please read this section carefully; it limits our obligations to you.** | | [P. Release and Indemnification](#p-release-and-indemnification) | You are fully responsible for your use of the service. | -| [Q. Changes to these Terms of Service](#q-changes-to-these-terms) | We may modify this agreement, but we will give you 30 days' notice of changes that affect your rights. | +| [Q. Changes to these Terms of Service](#q-changes-to-these-terms) | We may modify this agreement, but we will give you 30 days' notice of material changes. | | [R. Miscellaneous](#r-miscellaneous) | Please see this section for legal details including our choice of law. | ### The GitHub Terms of Service -Effective date: April 2, 2020 +Effective date: November 16, 2020 ### A. Definitions @@ -98,7 +98,7 @@ You agree that you will not under any circumstances violate our [Acceptable Use You may create or upload User-Generated Content while using the Service. You are solely responsible for the content of, and for any harm resulting from, any User-Generated Content that you post, upload, link to or otherwise make available via the Service, regardless of the form of that Content. We are not responsible for any public display or misuse of your User-Generated Content. #### 2. GitHub May Remove Content -We do not pre-screen User-Generated Content, but we have the right (though not the obligation) to refuse or remove any User-Generated Content that, in our sole discretion, violates any [GitHub terms or policies](/github/site-policy). +We have the right to refuse or remove any User-Generated Content that, in our sole discretion, violates any laws or [GitHub terms or policies](/github/site-policy). User-Generated Content displayed on GitHub for mobile may be subject to mobile app stores' additional terms. #### 3. Ownership of Content, Right to Post, and License Grants You retain ownership of and responsibility for Your Content. If you're posting anything you did not create yourself or do not own the rights to, you agree that you are responsible for any Content you post; that you will only submit Content that you have the right to post; and that you will fully comply with any third party licenses relating to Content you post. @@ -106,9 +106,9 @@ You retain ownership of and responsibility for Your Content. If you're posting a Because you retain ownership of and responsibility for Your Content, we need you to grant us — and other GitHub Users — certain legal permissions, listed in Sections D.4 — D.7. These license grants apply to Your Content. If you upload Content that already comes with a license granting GitHub the permissions we need to run our Service, no additional license is required. You understand that you will not receive any payment for any of the rights granted in Sections D.4 — D.7. The licenses you grant to us will end when you remove Your Content from our servers, unless other Users have forked it. #### 4. License Grant to Us -We need the legal right to do things like host Your Content, publish it, and share it. You grant us and our legal successors the right to store, parse, and display Your Content, and make incidental copies as necessary to render the Website and provide the Service. This includes the right to do things like copy it to our database and make backups; show it to you and other users; parse it into a search index or otherwise analyze it on our servers; share it with other users; and perform it, in case Your Content is something like music or video. +We need the legal right to do things like host Your Content, publish it, and share it. You grant us and our legal successors the right to store, archive, parse, and display Your Content, and make incidental copies, as necessary to provide the Service, including improving the Service over time. This license includes the right to do things like copy it to our database and make backups; show it to you and other users; parse it into a search index or otherwise analyze it on our servers; share it with other users; and perform it, in case Your Content is something like music or video. -This license does not grant GitHub the right to sell Your Content or otherwise distribute or use it outside of our provision of the Service. +This license does not grant GitHub the right to sell Your Content. It also does not grant GitHub the right to otherwise distribute or use Your Content outside of our provision of the Service, except that as part of the right to archive Your Content, GitHub may permit our partners to store and archive Your Content in public repositories in connection with the [GitHub Arctic Code Vault and GitHub Archive Program](https://archiveprogram.github.com/). #### 5. License Grant to Other Users Any User-Generated Content you post publicly, including issues, comments, and contributions to other Users' repositories, may be viewed by others. By setting your repositories to be viewed publicly, you agree to allow others to view and "fork" your repositories (this means that others may make their own copies of Content from your repositories in repositories they control). @@ -116,7 +116,7 @@ Any User-Generated Content you post publicly, including issues, comments, and co If you set your pages and repositories to be viewed publicly, you grant each User of GitHub a nonexclusive, worldwide license to use, display, and perform Your Content through the GitHub Service and to reproduce Your Content solely on GitHub as permitted through GitHub's functionality (for example, through forking). You may grant further rights if you [adopt a license](/articles/adding-a-license-to-a-repository/#including-an-open-source-license-in-your-repository). If you are uploading Content you did not create or own, you are responsible for ensuring that the Content you upload is licensed under terms that grant these permissions to other GitHub Users. #### 6. Contributions Under Repository License -Whenever you make a contribution to a repository containing notice of a license, you license your contribution under the same terms, and you agree that you have the right to license your contribution under those terms. If you have a separate agreement to license your contributions under different terms, such as a contributor license agreement, that agreement will supersede. +Whenever you add Content to a repository containing notice of a license, you license that Content under the same terms, and you agree that you have the right to license that Content under those terms. If you have a separate agreement to license that Content under different terms, such as a contributor license agreement, that agreement will supersede. Isn't this just how it works already? Yep. This is widely accepted as the norm in the open-source community; it's commonly referred to by the shorthand "inbound=outbound". We're just making it explicit. @@ -126,7 +126,7 @@ You retain all moral rights to Your Content that you upload, publish, or submit To the extent this agreement is not enforceable by applicable law, you grant GitHub the rights we need to use Your Content without attribution and to make reasonable adaptations of Your Content as necessary to render the Website and provide the Service. ### E. Private Repositories -**Short version:** *You may have access to private repositories. We treat the content of private repositories as confidential, and we only access it for support reasons, with your consent, or if required to for security reasons.* +**Short version:** *We treat the content of private repositories as confidential, and we only access it as described in our Privacy Statement—for security purposes, to assist the repository owner with a support matter, to maintain the integrity of the Service, to comply with our legal obligations, if we have reason to believe the contents are in violation of the law, or with your consent.* #### 1. Control of Private Repositories Some Accounts may have private repositories, which allow the User to control access to Content. @@ -135,15 +135,14 @@ Some Accounts may have private repositories, which allow the User to control acc GitHub considers the contents of private repositories to be confidential to you. GitHub will protect the contents of private repositories from unauthorized use, access, or disclosure in the same manner that we would use to protect our own confidential information of a similar nature and in no event with less than a reasonable degree of care. #### 3. Access -GitHub personnel may only access the content of your private repositories in the following situations: -- With your consent and knowledge, for support reasons. If GitHub accesses a private repository for support reasons, we will only do so with the owner’s consent and knowledge. -- When access is required for security reasons, including when access is required to maintain ongoing confidentiality, integrity, availability and resilience of GitHub's systems and Service. +GitHub personnel may only access the content of your private repositories in the situations described in our [Privacy Statement](/github/site-policy/github-privacy-statement#repository-contents). You may choose to enable additional access to your private repositories. For example: - You may enable various GitHub services or features that require additional rights to Your Content in private repositories. These rights may vary depending on the service or feature, but GitHub will continue to treat your private repository Content as confidential. If those services or features require rights in addition to those we need to provide the GitHub Service, we will provide an explanation of those rights. -#### 4. Exclusions -If we have reason to believe the contents of a private repository are in violation of the law or of these Terms, we have the right to access, review, and remove them. Additionally, we may be [compelled by law](/github/site-policy/github-privacy-statement#for-legal-disclosure) to disclose the contents of your private repositories. +Additionally, we may be [compelled by law](/github/site-policy/github-privacy-statement#for-legal-disclosure) to disclose the contents of your private repositories. + +GitHub will provide notice regarding our access to private repository content, unless [for legal disclosure](/github/site-policy/github-privacy-statement#for-legal-disclosure), to comply with our legal obligations, or where otherwise bound by requirements under law, for automated scanning, or if in response to a security threat or other risk to security. ### F. Copyright Infringement and DMCA Policy If you believe that content on our website violates your copyright, please contact us in accordance with our [Digital Millennium Copyright Act Policy](/articles/dmca-takedown-policy/). If you are a copyright owner and you believe that content on GitHub violates your rights, please contact us via [our convenient DMCA form](https://github.com/contact/dmca) or by emailing copyright@github.com. There may be legal consequences for sending a false or frivolous takedown notice. Before sending a takedown request, you must consider legal uses such as fair use and licensed uses. @@ -286,9 +285,9 @@ If you have a dispute with one or more Users, you agree to release GitHub from a You agree to indemnify us, defend us, and hold us harmless from and against any and all claims, liabilities, and expenses, including attorneys’ fees, arising out of your use of the Website and the Service, including but not limited to your violation of this Agreement, provided that GitHub (1) promptly gives you written notice of the claim, demand, suit or proceeding; (2) gives you sole control of the defense and settlement of the claim, demand, suit or proceeding (provided that you may not settle any claim, demand, suit or proceeding unless the settlement unconditionally releases GitHub of all liability); and (3) provides to you all reasonable assistance, at your expense. ### Q. Changes to These Terms -**Short version:** *We want our users to be informed of important changes to our terms, but some changes aren't that important — we don't want to bother you every time we fix a typo. So while we may modify this agreement at any time, we will notify users of any changes that affect your rights and give you time to adjust to them.* +**Short version:** *We want our users to be informed of important changes to our terms, but some changes aren't that important — we don't want to bother you every time we fix a typo. So while we may modify this agreement at any time, we will notify users of any material changes and give you time to adjust to them.* -We reserve the right, at our sole discretion, to amend these Terms of Service at any time and will update these Terms of Service in the event of any such amendments. We will notify our Users of material changes to this Agreement, such as price changes, at least 30 days prior to the change taking effect by posting a notice on our Website. For non-material modifications, your continued use of the Website constitutes agreement to our revisions of these Terms of Service. You can view all changes to these Terms in our [Site Policy](https://github.com/github/site-policy) repository. +We reserve the right, at our sole discretion, to amend these Terms of Service at any time and will update these Terms of Service in the event of any such amendments. We will notify our Users of material changes to this Agreement, such as price increases, at least 30 days prior to the change taking effect by posting a notice on our Website or sending email to the primary email address specified in your GitHub account. Customer's continued use of the Service after those 30 days constitutes agreement to those revisions of this Agreement. For any other modifications, your continued use of the Website constitutes agreement to our revisions of these Terms of Service. You can view all changes to these Terms in our [Site Policy](https://github.com/github/site-policy) repository. We reserve the right at any time and from time to time to modify or discontinue, temporarily or permanently, the Website (or any part of it) with or without notice. diff --git a/content/packages/getting-started-with-github-container-registry/about-github-container-registry.md b/content/packages/getting-started-with-github-container-registry/about-github-container-registry.md index 0ecfb6ab6968..15721dd10b37 100644 --- a/content/packages/getting-started-with-github-container-registry/about-github-container-registry.md +++ b/content/packages/getting-started-with-github-container-registry/about-github-container-registry.md @@ -8,7 +8,7 @@ versions: {% note %} -**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. +**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use {% data variables.product.prodname_github_container_registry %}, you must enable the feature for your account. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." {% endnote %} diff --git a/content/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization.md b/content/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization.md deleted file mode 100644 index ea75eedc3f38..000000000000 --- a/content/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Enabling GitHub Container Registry for your organization -intro: 'In an organization, organization admins can allow organization members to publish public or private container images to {% data variables.product.prodname_github_container_registry %}.' -product: '{% data reusables.gated-features.packages %}' -versions: - free-pro-team: '*' ---- - -{% data reusables.package_registry.container-registry-beta %} - -Before organization members can publish container images to {% data variables.product.prodname_github_container_registry %}, an organization admin must enable package creation. - -{% data reusables.profile.access_profile %} -{% data reusables.profile.access_org %} -{% data reusables.organizations.org_settings %} -{% data reusables.organizations.member-privileges %} -5. Under "Package creation", choose whether you want to enable the creation of public or private container images. - - To enable organization members to create a public container image, click **Public**. - - To enable organization members to create a private container image that is only visible to other organization members, click **Private**. You can further customize the visibility of a private container image. For more information, see "[Configuring access control and visibility for container images](/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images)." - - ![Options to enable public or private packages ](/assets/images/help/package-registry/package-creation-org-settings.png) diff --git a/content/packages/getting-started-with-github-container-registry/enabling-improved-container-support.md b/content/packages/getting-started-with-github-container-registry/enabling-improved-container-support.md new file mode 100644 index 000000000000..dbfccede7f4e --- /dev/null +++ b/content/packages/getting-started-with-github-container-registry/enabling-improved-container-support.md @@ -0,0 +1,39 @@ +--- +title: Enabling improved container support +intro: 'To use {% data variables.product.prodname_github_container_registry %}, you must enable it for your user or organization account.' +product: '{% data reusables.gated-features.packages %}' +versions: + free-pro-team: '*' +--- + +{% note %} + +**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/getting-started-with-github-container-registry/about-github-container-registry)." + +{% endnote %} + +### Enabling {% data variables.product.prodname_github_container_registry %} for your personal account + +Once {% data variables.product.prodname_github_container_registry %} is enabled for your personal user account, you can publish containers to {% data variables.product.prodname_github_container_registry %} owned by your user account. + +To use {% data variables.product.prodname_github_container_registry %} within an organization, the organization owner must enable the feature for organization members. + +{% data reusables.feature-preview.feature-preview-setting %} +2. On the left, select "Improved container support", then click **Enable**. + ![Improved container support](/assets/images/help/settings/improved-container-support.png) + +### Enabling {% data variables.product.prodname_github_container_registry %} for your organization account + +Before organization owners or members can publish container images to {% data variables.product.prodname_github_container_registry %}, an organization owner must enable the feature preview for the organization. + +{% data reusables.profile.access_profile %} +{% data reusables.profile.access_org %} +{% data reusables.organizations.org_settings %} +4. On the left, click **Packages**. +5. Under "Improved container support", select "Enable improved container support" and click **Save**. + ![Enable container registry support option and save button](/assets/images/help/package-registry/enable-improved-container-support-for-orgs.png) +6. Under "Container creation", choose whether you want to enable the creation of public and/or private container images. + - To enable organization members to create public container images, click **Public**. + - To enable organization members to create private container images that are only visible to other organization members, click **Private**. You can further customize the visibility of private container images. For more information, see "[Configuring access control and visibility for container images](/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images)." + + ![Options to enable public or private packages ](/assets/images/help/package-registry/package-creation-org-settings.png) diff --git a/content/packages/getting-started-with-github-container-registry/index.md b/content/packages/getting-started-with-github-container-registry/index.md index 46849f39a609..f07fd0941c04 100644 --- a/content/packages/getting-started-with-github-container-registry/index.md +++ b/content/packages/getting-started-with-github-container-registry/index.md @@ -8,8 +8,8 @@ versions: {% data reusables.package_registry.container-registry-beta %} {% link_in_list /about-github-container-registry %} +{% link_in_list /enabling-improved-container-support %} {% link_in_list /core-concepts-for-github-container-registry %} {% link_in_list /migrating-to-github-container-registry-for-docker-images %} -{% link_in_list /enabling-github-container-registry-for-your-organization %} For more information about configuring, deleting, pushing, or pulling container images, see "[Managing container images with {% data variables.product.prodname_github_container_registry %}](/packages/managing-container-images-with-github-container-registry)." diff --git a/content/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images.md b/content/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images.md index 3a89524a8455..8f647b482509 100644 --- a/content/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images.md +++ b/content/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images.md @@ -31,6 +31,8 @@ The domain for the {% data variables.product.prodname_container_registry %} is ` ### Authenticating with the container registry +{% data reusables.package_registry.feature-preview-for-container-registry %} + You will need to authenticate to the {% data variables.product.prodname_container_registry %} with the base URL `ghcr.io`. We recommend creating a new access token for using the {% data variables.product.prodname_container_registry %}. {% data reusables.package_registry.authenticate_with_pat_for_container_registry %} @@ -70,6 +72,8 @@ To move Docker images that you host on {% data variables.product.prodname_regist ### Updating your {% data variables.product.prodname_actions %} workflow +{% data reusables.package_registry.feature-preview-for-container-registry %} + If you have a {% data variables.product.prodname_actions %} workflow that uses a Docker image from the {% data variables.product.prodname_registry %} Docker registry, you may want to update your workflow to the {% data variables.product.prodname_container_registry %} to allow for anonymous access for public container images, finer-grain access permissions, and better storage and bandwidth compatibility for containers. 1. Migrate your Docker images to the new {% data variables.product.prodname_container_registry %} at `ghcr.io`. For an example, see "[Migrating a Docker image using the Docker CLI](#migrating-a-docker-image-using-the-docker-cli)." diff --git a/content/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images.md b/content/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images.md index 23507122e81b..8779fdf8efde 100644 --- a/content/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images.md +++ b/content/packages/managing-container-images-with-github-container-registry/configuring-access-control-and-visibility-for-container-images.md @@ -26,7 +26,7 @@ If you have admin permissions to an organization-owned container image, you can If your package is owned by an organization and private, then you can only give access to other organization members or teams. -For organization image containers, organizations admins must enable packages before you can set the visibility to public. For more information, see "[Enabling GitHub Container Registry for your organization](/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization)." +For organization image containers, organizations admins must enable packages before you can set the visibility to public. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." {% data reusables.package_registry.package-settings-from-org-level %} 1. On the package settings page, click **Invite teams or people** and enter the name, username, or email of the person you want to give access. You can also enter a team name from the organization to give all team members access. @@ -59,7 +59,7 @@ When you first publish a package, the default visibility is private and only you A public package can be accessed anonymously without authentication. Once you make your package public, you cannot make your package private again. -For organization image containers, organizations admins must enable public packages before you can set the visibility to public. For more information, see "[Enabling GitHub Container Registry for your organization](/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization)." +For organization image containers, organizations admins must enable public packages before you can set the visibility to public. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." {% data reusables.package_registry.package-settings-from-org-level %} 5. Under "Danger Zone", choose a visibility setting: diff --git a/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md b/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md index e4e1db91970c..5dd0f067e25a 100644 --- a/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md +++ b/content/packages/managing-container-images-with-github-container-registry/pushing-and-pulling-docker-images.md @@ -8,7 +8,7 @@ versions: {% data reusables.package_registry.container-registry-beta %} -To push and pull container images owned by an organization, an organization admin must enable {% data variables.product.prodname_github_container_registry %} for the organization. For more information, see "[Enabling GitHub Container Registry for your organization](/packages/getting-started-with-github-container-registry/enabling-github-container-registry-for-your-organization)." +To push and pull container images owned by an organization, an organization admin must enable {% data variables.product.prodname_github_container_registry %} for the organization. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." ### Authenticating to {% data variables.product.prodname_github_container_registry %} diff --git a/content/packages/publishing-and-managing-packages/about-github-packages.md b/content/packages/publishing-and-managing-packages/about-github-packages.md index 32f561cf5286..0c6576a927a9 100644 --- a/content/packages/publishing-and-managing-packages/about-github-packages.md +++ b/content/packages/publishing-and-managing-packages/about-github-packages.md @@ -26,6 +26,8 @@ You can integrate {% data variables.product.prodname_registry %} with {% data va {% data reusables.package_registry.container-registry-beta %} +![Diagram showing Node, RubyGems, Apache Maven, Gradle, Nuget, and the container registry with their hosting urls](/assets/images/help/package-registry/packages-overview-diagram.png) + {% endif %} #### Viewing packages diff --git a/data/reusables/feature-preview/feature-preview-setting.md b/data/reusables/feature-preview/feature-preview-setting.md new file mode 100644 index 000000000000..c14959bda981 --- /dev/null +++ b/data/reusables/feature-preview/feature-preview-setting.md @@ -0,0 +1,2 @@ +1. In the upper-right corner of any page, click your profile photo, then click **Feature preview**. + ![Feature preview button](/assets/images/help/settings/feature-preview-button.png) \ No newline at end of file diff --git a/data/reusables/package_registry/container-registry-beta.md b/data/reusables/package_registry/container-registry-beta.md index df0f9843b029..24313880baea 100644 --- a/data/reusables/package_registry/container-registry-beta.md +++ b/data/reusables/package_registry/container-registry-beta.md @@ -1,5 +1,5 @@ {% note %} -**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/getting-started-with-github-container-registry/about-github-container-registry)." +**Note:** {% data variables.product.prodname_github_container_registry %} is currently in public beta and subject to change. During the beta, storage and bandwidth are free. To use {% data variables.product.prodname_github_container_registry %}, you must enable the feature preview. For more information, see "[About {% data variables.product.prodname_github_container_registry %}](/packages/getting-started-with-github-container-registry/about-github-container-registry)" and "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." {% endnote %} diff --git a/data/reusables/package_registry/feature-preview-for-container-registry.md b/data/reusables/package_registry/feature-preview-for-container-registry.md new file mode 100644 index 000000000000..b0cddc8bcb84 --- /dev/null +++ b/data/reusables/package_registry/feature-preview-for-container-registry.md @@ -0,0 +1,5 @@ +{% note %} + +**Note:** Before you can use {% data variables.product.prodname_github_container_registry %}, you must enable the feature for your account. For more information, see "[Enabling improved container support](/packages/getting-started-with-github-container-registry/enabling-improved-container-support)." + +{% endnote %} \ No newline at end of file diff --git a/data/ui.yml b/data/ui.yml index ef36184ff52c..d144567335c1 100644 --- a/data/ui.yml +++ b/data/ui.yml @@ -17,6 +17,7 @@ header: still in translation. For the most up-to-date and accurate information, please visit our English documentation. + early_access: 👋 This page contains content about an early access feature. Please do not share this URL publicly. search: need_help: Need help? placeholder: Search topics, products... diff --git a/includes/article.html b/includes/article.html index e448c18d8f71..30d3f67b8f02 100644 --- a/includes/article.html +++ b/includes/article.html @@ -69,10 +69,11 @@

+ {% assign helpId = 'sm' %} + {% include helpfulness %} + {% include contribution %} + -
- {% assign helpId = 'sm' %} - {% include helpfulness %} - {% include contribution %} -
diff --git a/includes/contribution.html b/includes/contribution.html index 3743865bec3a..e6409255d706 100644 --- a/includes/contribution.html +++ b/includes/contribution.html @@ -1,4 +1,5 @@ -
+{% unless enterpriseServerReleases.isOldestReleaseDeprecated and currentVersion contains enterpriseServerReleases.oldestSupported %} + +{% endunless %} \ No newline at end of file diff --git a/includes/deprecation-banner.html b/includes/deprecation-banner.html index 6c1b30a0ceb3..df2a841f547b 100644 --- a/includes/deprecation-banner.html +++ b/includes/deprecation-banner.html @@ -2,11 +2,12 @@

- - {% data reusables.enterprise_deprecation.version_will_be_deprecated %} - - - {% data reusables.enterprise_deprecation.version_was_deprecated %} + + {% if enterpriseServerReleases.isOldestReleaseDeprecated %} + {% data reusables.enterprise_deprecation.version_was_deprecated %} + {% else %} + {% data reusables.enterprise_deprecation.version_will_be_deprecated %} + {% endif %} {{ enterpriseServerReleases.nextDeprecationDate }}. diff --git a/includes/header-notification.html b/includes/header-notification.html index 7c5cc5e8a0f8..7c65d65ba364 100644 --- a/includes/header-notification.html +++ b/includes/header-notification.html @@ -29,6 +29,13 @@ {% endif %} + +{% if page.hidden %} +{% assign early_access_notification_type = true %} +{% assign early_access_notification = site.data.ui.header.notices.early_access %} +{% endif %} + + {% if translation_notification_type %}

{{ translation_notification }} @@ -36,7 +43,13 @@ {% endif %} {% if release_notification_type %} -
+
{{ release_notification }}
{% endif %} + +{% if early_access_notification_type %} +
+ {{ early_access_notification }} +
+{% endif %} \ No newline at end of file diff --git a/includes/helpfulness.html b/includes/helpfulness.html index 1b78f9a375ea..5164323fac7c 100644 --- a/includes/helpfulness.html +++ b/includes/helpfulness.html @@ -1,11 +1,16 @@ +{% unless enterpriseServerReleases.isOldestReleaseDeprecated and currentVersion contains enterpriseServerReleases.oldestSupported %}

{% data ui.helpfulness.able_to_find %}

+

+ Privacy policy +

+{% endunless %} \ No newline at end of file diff --git a/includes/sidebar-specific-product.html b/includes/sidebar-specific-product.html index 36ff7df74f30..d9d625070437 100644 --- a/includes/sidebar-specific-product.html +++ b/includes/sidebar-specific-product.html @@ -23,11 +23,14 @@
{{ category[1].title }} + {% if breadcrumbs.category.href == category[1].href or forloop.index < 4 %} + {% endif %}
{% endif %} + {% if breadcrumbs.category.href == category[1].href or forloop.index < 4 %} {% if category[1].maptopics %} {% endif %} + {% endif %} {% endfor %} diff --git a/javascripts/deprecation-banner.js b/javascripts/deprecation-banner.js deleted file mode 100644 index 53081a27a44c..000000000000 --- a/javascripts/deprecation-banner.js +++ /dev/null @@ -1,30 +0,0 @@ -// Make deprecation banner language adaptive to past and future tense based on deprecation date - -export default function () { - const spanWillBeDeprecated = document.querySelector('span[data-display-until]') - const spanWasDeprecated = document.querySelector('span[data-display-starting]') - - if (!spanWillBeDeprecated) return - if (!spanWasDeprecated) return - - const today = getDate() - - const deprecationDate = getDate(spanWillBeDeprecated.getAttribute('data-display-until')) - - // if deprecation date is >= today's date, the date is in the future, so display "will be deprecated" - // if deprecation date is < today's date, the date is in the past, so display "was deprecated" - if (deprecationDate > today || getTime(deprecationDate) === getTime(today)) { - spanWasDeprecated.style.display = 'none' - } else { - spanWillBeDeprecated.style.display = 'none' - } -} - -function getDate (date) { - const dateObj = date ? new Date(date) : new Date() - return dateObj.toISOString().slice(0, 10) -} - -function getTime (date) { - return new Date(date).getTime() -} diff --git a/javascripts/dev-toc.js b/javascripts/dev-toc.js new file mode 100644 index 000000000000..d62cac7c4513 --- /dev/null +++ b/javascripts/dev-toc.js @@ -0,0 +1,39 @@ +const expandText = 'Expand All' +const closeText = 'Close All' + +export default function devToc () { + const expandButton = document.querySelector('.js-expand') + if (!expandButton) return + + const detailsElements = document.querySelectorAll('details') + + expandButton.addEventListener('click', () => { + // on click, toggle all the details elements open or closed + const anyDetailsOpen = Array.from(detailsElements).find(details => details.open) + + for (const detailsElement of detailsElements) { + anyDetailsOpen + ? detailsElement.removeAttribute('open') + : detailsElement.open = true + } + + // toggle the button text on click + anyDetailsOpen + ? expandButton.textContent = expandText + : expandButton.textContent = closeText + }) + + // also toggle the button text on clicking any of the details elements + for (const detailsElement of detailsElements) { + detailsElement.addEventListener('click', () => { + expandButton.textContent = closeText + + // we can only get an accurate count of the open details elements if we wait a fraction after click + setTimeout(() => { + if (!Array.from(detailsElements).find(details => details.open)) { + expandButton.textContent = expandText + } + }, 50) + }) + } +} diff --git a/javascripts/events.js b/javascripts/events.js index 4a05744635b5..c995f21e000f 100644 --- a/javascripts/events.js +++ b/javascripts/events.js @@ -63,6 +63,7 @@ export function sendEvent ({ // Content information path: location.pathname, + hostname: location.hostname, referrer: document.referrer, search: location.search, href: location.href, @@ -191,6 +192,8 @@ export default function initializeEvents () { }) }) + if (!document.querySelector('.sidebar-products')) return + // Navigate event Array.from( document.querySelectorAll('.sidebar-products details') diff --git a/javascripts/experiment.js b/javascripts/experiment.js index b9aeea81fbfd..ba501f52d9d5 100644 --- a/javascripts/experiment.js +++ b/javascripts/experiment.js @@ -40,22 +40,29 @@ export default function () { // const testName = '$test-name$' // const xbucket = bucket(testName) // if (xbucket === TREATMENT) { ... } - // x.addEventListener('click', evt => evt.preventDefault(); await sendSuccess(testName); evt()) + // x.addEventListener('click', () => { sendSuccess(testName) }) - const treatment = document.getElementById('quickstart-treatment') - if (!treatment) return - - const testName = 'quickstart-hello' + const testName = 'helpfulness-prompt-to-bottom' const xbucket = bucket(testName) if (xbucket === TREATMENT) { - Array.from( - document.querySelectorAll('#article-contents > *') - ).forEach(el => { el.hidden = true }) - treatment.hidden = false + const bigHelpfulness = document.querySelector('#helpfulness-xl') + const smallHelpfulness = document.querySelector('#helpfulness-sm') + + // Check that helpfulness prompt is present on this page + if (!(bigHelpfulness && smallHelpfulness)) { + return + } + + // Remove the -xl prompts + bigHelpfulness.parentElement.parentElement.removeChild(bigHelpfulness.parentElement) + + // Always show the -sm prompt + smallHelpfulness.parentElement.classList.remove('d-xl-none') } - document.documentElement.addEventListener('copy', () => { - sendSuccess(testName) + const votes = Array.from(document.querySelectorAll('.js-helpfulness [type=radio]')) + votes.forEach(voteEl => { + voteEl.addEventListener('change', () => { sendSuccess(testName) }) }) } diff --git a/javascripts/index.js b/javascripts/index.js index 803d7a155380..c1f83b947d7e 100644 --- a/javascripts/index.js +++ b/javascripts/index.js @@ -5,7 +5,6 @@ import explorer from './explorer' import search from './search' import nav from './nav' import browserDateFormatter from 'browser-date-formatter' -import deprecationBanner from './deprecation-banner' import sidebar from './sidebar' import wrapCodeTerms from './wrap-code-terms' import print from './print' @@ -17,6 +16,7 @@ import { fillCsrf } from './get-csrf' import initializeEvents from './events' import filterCodeExamples from './filter-code-examples' import allArticles from './all-articles' +import devToc from './dev-toc' document.addEventListener('DOMContentLoaded', async () => { displayPlatformSpecificContent() @@ -24,16 +24,16 @@ document.addEventListener('DOMContentLoaded', async () => { search() nav() browserDateFormatter() - deprecationBanner() sidebar() wrapCodeTerms() print() localization() - await fillCsrf() // this must complete before any POST calls - helpfulness() - experiment() copyCode() - initializeEvents() filterCodeExamples() allArticles() + devToc() + await fillCsrf() // this must complete before any POST calls + initializeEvents() // requires fillCsrf to complete + experiment() // requires fillCsrf to complete + helpfulness() // requires fillCsrf to complete }) diff --git a/javascripts/nav.js b/javascripts/nav.js index b53cd500a3cf..87d4dde911bd 100644 --- a/javascripts/nav.js +++ b/javascripts/nav.js @@ -3,6 +3,8 @@ export default function () { const hamburgerButton = document.querySelector('.nav-mobile-burgerIcon') const mobileDropdown = document.querySelector('.nav-mobile-dropdown') + if (!(hamburgerButton && mobileDropdown)) return + hamburgerButton.addEventListener('click', (event) => { event.preventDefault() hamburgerButton.classList.toggle('js-open') diff --git a/javascripts/search.js b/javascripts/search.js index c363b4bc02e9..19ad23ea660f 100644 --- a/javascripts/search.js +++ b/javascripts/search.js @@ -63,6 +63,8 @@ const resultTemplate = (item) => { } export default function () { + if (!document.querySelector('#search-results-container')) return + window.initialPageLoad = true const opts = { diff --git a/javascripts/sidebar.js b/javascripts/sidebar.js index 979cd1dccde4..baae735d44a3 100644 --- a/javascripts/sidebar.js +++ b/javascripts/sidebar.js @@ -12,7 +12,7 @@ export default function () { menu.scrollTo(0, activeMenuItemPosition) } - // if the active cagetory is a standalone category, do not close the other open dropdowns + // if the active category is a standalone category, do not close the other open dropdowns const activeStandaloneCategory = document.querySelectorAll('.sidebar-category.active.standalone-category') if (activeStandaloneCategory.length) return @@ -21,6 +21,8 @@ export default function () { if (allOpenDetails) { for (const openDetail of allOpenDetails) { openDetail.removeAttribute('open') + const svgArrowElem = openDetail.querySelector('summary > div > svg') + svgArrowElem.remove() } } } diff --git a/layouts/dev-toc.html b/layouts/dev-toc.html new file mode 100644 index 000000000000..59fe20ab5ad5 --- /dev/null +++ b/layouts/dev-toc.html @@ -0,0 +1,82 @@ + + + + +Docs TOC + + + + + + +
+ +

Versions

+ + +{% if allVersions[currentVersion] %} +

TOC for {{ allVersions[currentVersion].versionTitle }}

+ + +
+ +{% for product in siteTree[currentLanguage][currentVersion].products %} +
{{product[1].title}} +
    +
  • + {{ product[1].title }} + {% for category in product[1].categories %} + {% capture fullPathToCategory %}/{{currentLanguage}}{{category[1].href}}{% endcapture %} +
      +
    • + {{ category[1].title }} + + {% if category[1].maptopics %} + + {% for maptopic in category[1].maptopics %} + {% unless maptopic[1].hidden %} + {% capture fullPathToMaptopic %}/{{currentLanguage}}{{maptopic[1].href}}{% endcapture %} + +
    • + {{ maptopic[1].title }} +
        + {% for article in maptopic[1].articles %} + {% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %} + +
      • + {{ article[1].title }} +
      • + {% endfor %} +
      +
    • + {% endunless %} + {% endfor %} +
    + + {% else %} +
      + {% for article in category[1].articles %} + {% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %} +
    • + {{ article[1].title }} +
    • + {% endfor %} +
    + {% endif %} +
  • + {% endfor %} +
+ + +
+{% endfor %} +{% endif %} + +{% include scripts %} +
+ + \ No newline at end of file diff --git a/lib/enterprise-server-releases.js b/lib/enterprise-server-releases.js index 4de93523713c..71baed4f375b 100644 --- a/lib/enterprise-server-releases.js +++ b/lib/enterprise-server-releases.js @@ -36,11 +36,12 @@ const all = supported.concat(deprecated) const latest = supported[0] const oldestSupported = supported[supported.length - 1] const nextDeprecationDate = dates[oldestSupported].deprecationDate +const isOldestReleaseDeprecated = new Date() > new Date(nextDeprecationDate) const deprecatedOnNewSite = deprecated.filter(version => versionSatisfiesRange(version, '>=2.13')) const firstVersionDeprecatedOnNewSite = '2.13' // starting from 2.18, we updated the archival script to create stubbed HTML redirect files const lastVersionWithoutStubbedRedirectFiles = '2.17' -// last version using paths like /enterprise/////
+// last version using paths like /enterprise/////
// instead of /enterprise-server@///
const lastReleaseWithLegacyFormat = '2.18' @@ -51,6 +52,7 @@ module.exports = { latest, oldestSupported, nextDeprecationDate, + isOldestReleaseDeprecated, deprecatedOnNewSite, dates, firstVersionDeprecatedOnNewSite, diff --git a/lib/schema-event.js b/lib/schema-event.js index bf7fcb429e42..059a9112f142 100644 --- a/lib/schema-event.js +++ b/lib/schema-event.js @@ -39,6 +39,11 @@ const context = { description: 'The browser value of `location.pathname`.', format: 'uri-reference' }, + hostname: { + type: 'string', + description: 'The browser value of `location.hostname.`', + format: 'uri-reference' + }, referrer: { type: 'string', description: 'The browser value of `document.referrer`.', diff --git a/lib/statsd.js b/lib/statsd.js index 7d32851d7dd8..22e61e1208e5 100644 --- a/lib/statsd.js +++ b/lib/statsd.js @@ -1,6 +1,6 @@ const StatsD = require('hot-shots') -const mock = Boolean(process.env.NODE_ENV === 'test' || !process.env.DATADOG_API_KEY) +const mock = Boolean(process.env.NODE_ENV === 'test' || !process.env.DD_API_KEY) /** * @type {import('hot-shots').StatsD} diff --git a/middleware/dev-toc.js b/middleware/dev-toc.js new file mode 100644 index 000000000000..5e00093e556a --- /dev/null +++ b/middleware/dev-toc.js @@ -0,0 +1,9 @@ +const { liquid } = require('../lib/render-content') +const layouts = require('../lib/layouts') + +module.exports = async (req, res, next) => { + if (process.env.NODE_ENV !== 'development') return next() + if (!req.path.endsWith('/dev-toc')) return next() + + return res.send(await liquid.parseAndRender(layouts['dev-toc'], req.context)) +} diff --git a/middleware/enterprise-homepage.js b/middleware/enterprise-homepage.js deleted file mode 100644 index 06a6b54b4566..000000000000 --- a/middleware/enterprise-homepage.js +++ /dev/null @@ -1,10 +0,0 @@ -// This is a hack to prevent 'too many redirects' error in production -// TODO: figure out what's causing it and remove this hack. - -const enterpriseServerReleases = require('../lib/enterprise-server-releases') - -module.exports = (req, res, next) => { - return (req.path === '/enterprise') - ? res.redirect(301, `/en/enterprise/${enterpriseServerReleases.latest}`) - : next() -} diff --git a/middleware/homepages.js b/middleware/homepages.js deleted file mode 100644 index ca585eecfa64..000000000000 --- a/middleware/homepages.js +++ /dev/null @@ -1,26 +0,0 @@ -const patterns = require('../lib/patterns') -const allVersions = require('../lib/all-versions') - -// Add `req.context.homepages` for building a list of product links in the -// header, bearing the current page's language and product in mind. - -module.exports = async function addHomepagesToContext (req, res, next) { - req.context.homepages = allVersions.map(version => { - let href, title, active - if (version === 'dotcom') { - href = `/${req.language}` - title = 'GitHub.com' - active = !patterns.enterprise.test(req.path) - } else { - href = `/${req.language}/enterprise/${version}` - title = `Enterprise Server ${version}` - active = req.path.includes(`/enterprise/${version}`) - } - - return { title, href, active } - }) - - req.context.currentHomepage = req.context.homepages.find(product => product.active) || req.context.homepages[0] - - return next() -} diff --git a/middleware/index.js b/middleware/index.js index 19ebf17ba665..ce3ea112904a 100644 --- a/middleware/index.js +++ b/middleware/index.js @@ -10,52 +10,73 @@ const asyncMiddleware = fn => } module.exports = function (app) { + // *** Development tools *** + app.use(require('morgan')('dev', { skip: (req, res) => !isDevelopment })) + if (isDevelopment) app.use(require('./webpack')) + + // *** Early exits *** // Don't use the proxy's IP, use the requester's for rate limiting // See https://expressjs.com/en/guide/behind-proxies.html app.set('trust proxy', 1) - app.use(require('morgan')('dev', { skip: (req, res) => !isDevelopment })) app.use(require('./rate-limit')) - if (isDevelopment) app.use(require('./webpack')) - app.use(require('./cookie-parser')) - app.use(require('./req-utils')) - app.use(require('./record-redirect')) - app.use(require('./redirects/external')) - app.use(require('./redirects/help-to-docs')) - app.use(require('./set-fastly-cache-headers')) app.use(require('./handle-invalid-paths')) - app.use(require('./loaderio-verification')) + + // *** Security *** app.use(require('./cors')) - app.use(require('./csp')) + app.use(require('./csp')) // Must come before helmet app.use(require('helmet')()) - app.use(require('./robots')) - app.use(express.json()) // Must come before ./csrf + app.use(require('./cookie-parser')) // Must come before csrf + app.use(express.json()) // Must come before csrf app.use(require('./csrf')) - app.use(require('./handle-csrf-errors')) + app.use(require('./handle-csrf-errors')) // Must come before regular handle-errors + + // *** Headers *** app.use(require('compression')()) + app.use(require('./set-fastly-cache-headers')) + app.use(require('./disable-caching-on-safari')) + + // *** Config and context for redirects *** + app.use(require('./req-utils')) // Must come before record-redirect and events + app.use(require('./record-redirect')) + app.use(require('./detect-language')) // Must come before context, breadcrumbs, find-page, handle-errors, homepages + app.use(asyncMiddleware(require('./context'))) // Must come before early-access-*, handle-redirects + + // *** Redirects, 3xx responses *** + // I ordered these by use frequency app.use(require('connect-slashes')(false)) + app.use(require('./redirects/external')) + app.use(require('./redirects/help-to-docs')) + app.use(require('./redirects/language-code-redirects')) // Must come before contextualizers + app.use(require('./redirects/handle-redirects')) // Must come before contextualizers + + // *** Config and context for rendering *** + app.use(require('./find-page')) // Must come before archived-enterprise-versions, breadcrumbs, featured-links, products, render-page + + // *** Rendering, 2xx responses *** + // I largely ordered these by use frequency + app.use(require('./archived-enterprise-versions-assets')) // Must come before static/assets app.use('/dist', express.static('dist')) + app.use('/assets', express.static('assets')) + app.use('/public', express.static('data/graphql')) app.use('/events', require('./events')) - app.use(require('./categories-for-support-team')) - app.use(require('./detect-language')) - app.use(asyncMiddleware(require('./context'))) app.use('/csrf', require('./csrf-route')) + app.use(require('./archived-enterprise-versions')) + app.use(require('./robots')) app.use(require('./early-access-paths')) app.use(require('./early-access-proxy')) - app.use(require('./find-page')) - app.use(require('./archived-enterprise-versions')) - app.use(require('./archived-enterprise-versions-assets')) - app.use('/assets', express.static('assets')) - app.use('/public', express.static('data/graphql')) - app.use(require('./redirects/language-code-redirects')) - // redirects need to be handled before the contextualizers - app.use(require('./redirects/handle-redirects')) + app.use(require('./categories-for-support-team')) + app.use(require('./loaderio-verification')) + app.get('/_500', asyncMiddleware(require('./trigger-error'))) + + // *** Preparation for render-page *** app.use(require('./contextualizers/graphql')) app.use(require('./contextualizers/rest')) app.use(require('./contextualizers/webhooks')) - app.use(require('./disable-caching-on-safari')) - app.get('/_500', asyncMiddleware(require('./trigger-error'))) app.use(require('./breadcrumbs')) + app.use(require('./dev-toc')) app.use(require('./featured-links')) + + // *** Rendering, must go last *** app.get('/*', asyncMiddleware(require('./render-page'))) app.use(require('./handle-errors')) } diff --git a/middleware/products.js b/middleware/products.js deleted file mode 100644 index b3aa2cc28721..000000000000 --- a/middleware/products.js +++ /dev/null @@ -1,20 +0,0 @@ -const products = require('../lib/all-products') -const activeProducts = Object.values(products).filter(product => !product.wip) -const patterns = require('../lib/patterns') - -module.exports = async (req, res, next) => { - req.context.activeProducts = activeProducts - - if (req.path.match(patterns.admin)) { - // special case for enterprise URLs which take many forms... - req.context.currentProduct = products.enterpriseServer - } else if (req.context.page) { - // find current product by matching up starting file paths - req.context.currentProduct = Object.values(products).find(product => `content/${req.context.page.relativePath}`.startsWith(product.dir)) - } - - // fall back to the GitHub.com product - req.context.currentProduct = req.context.currentProduct || products.github - - return next() -} diff --git a/middleware/rate-limit.js b/middleware/rate-limit.js index 3a2ecfa64da9..6020d634e127 100644 --- a/middleware/rate-limit.js +++ b/middleware/rate-limit.js @@ -1,13 +1,17 @@ const rateLimit = require('express-rate-limit') +const RedisStore = require('rate-limit-redis') const isProduction = process.env.NODE_ENV === 'production' +const REDIS_URL = process.env.REDIS_URL module.exports = rateLimit({ // 1 minute (or practically unlimited outside of production) windowMs: isProduction ? (60 * 1000) : 1, - // limit each IP to 20 requests per windowMs + // limit each IP to X requests per windowMs max: 250, // Don't rate limit requests for 200s and redirects // Or anything with a status code less than 400 - skipSuccessfulRequests: true + skipSuccessfulRequests: true, + // When available, use Redis + store: REDIS_URL && new RedisStore({ redisURL: REDIS_URL }) }) diff --git a/package-lock.json b/package-lock.json index e3ef9e5c2100..55b713a58e95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4892,6 +4892,11 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, "clone-deep": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", @@ -5979,6 +5984,14 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "^1.0.2" + } + }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -6078,6 +6091,11 @@ "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -17202,6 +17220,15 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, + "rate-limit-redis": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rate-limit-redis/-/rate-limit-redis-2.0.0.tgz", + "integrity": "sha512-06EwXCcJYSKhKDyNPVgnAhwGk0uKxd0mpKdLpdJhnZGRoRzrxHWmponQn8Eq3hMLgbwPVvqdkgun3ZFWKKpuXg==", + "requires": { + "defaults": "^1.0.3", + "redis": "^3.0.2" + } + }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", @@ -17373,6 +17400,35 @@ "strip-indent": "^3.0.0" } }, + "redis": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/redis/-/redis-3.0.2.tgz", + "integrity": "sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ==", + "requires": { + "denque": "^1.4.1", + "redis-commands": "^1.5.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0" + } + }, + "redis-commands": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=" + }, + "redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", + "requires": { + "redis-errors": "^1.0.0" + } + }, "reduce": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/reduce/-/reduce-1.0.2.tgz", diff --git a/package.json b/package.json index 2630dcc529ee..bdbaab89c1ee 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "platform-utils": "^1.2.0", "port-used": "^2.0.8", "querystring": "^0.2.0", + "rate-limit-redis": "^2.0.0", "readline-sync": "^1.4.10", "resolve-url-loader": "^3.1.2", "rimraf": "^3.0.0", diff --git a/script/archive-enterprise-version.js b/script/archive-enterprise-version.js index 35450bf3d9cc..c3dce4d46ac4 100755 --- a/script/archive-enterprise-version.js +++ b/script/archive-enterprise-version.js @@ -66,7 +66,7 @@ class RewriteAssetPathsPlugin { await fs .promises - .writeFile(filePath, newBody) + .writeFile(filePath, newBody, 'binary') }) } } diff --git a/stylesheets/dev-toc.scss b/stylesheets/dev-toc.scss new file mode 100644 index 000000000000..6c16a24b865e --- /dev/null +++ b/stylesheets/dev-toc.scss @@ -0,0 +1,14 @@ +/* Styles used for top-level TOC in development only +------------------------------------------------------------------------------*/ + +ul.versions-list { + list-style-type: none; +} + +ul.versions-list > li { + margin: 3px 0 0 0; +} + +details ul.products-list li { + margin: 3px 0 0 30px; +} \ No newline at end of file diff --git a/stylesheets/index.scss b/stylesheets/index.scss index b2882d24479c..d0cd95ec1327 100644 --- a/stylesheets/index.scss +++ b/stylesheets/index.scss @@ -55,3 +55,4 @@ $marketing-font-path: "/dist/fonts/"; @import "print.scss"; @import "shadows.scss"; @import "product-landing.scss"; +@import "dev-toc.scss"; diff --git a/tests/rendering/events.js b/tests/rendering/events.js index e7912ee80c93..547f93a2f523 100644 --- a/tests/rendering/events.js +++ b/tests/rendering/events.js @@ -48,6 +48,7 @@ describe('POST /events', () => { // Content information path: '/github/docs/issues', + hostname: 'github.com', referrer: 'https://github.com/github/docs', search: '?q=is%3Aissue+is%3Aopen+example+', href: 'https://github.com/github/docs/issues?q=is%3Aissue+is%3Aopen+example+', @@ -138,6 +139,16 @@ describe('POST /events', () => { }, 400) ) + it('should hostname be uri-reference', () => + checkEvent({ + ...pageExample, + context: { + ...pageExample.context, + hostname: ' ' + } + }, 400) + ) + it('should referrer be uri-reference', () => checkEvent({ ...pageExample, diff --git a/tests/routing/deprecated-enterprise-versions.js b/tests/routing/deprecated-enterprise-versions.js index 9696b4b97609..559e710db44a 100644 --- a/tests/routing/deprecated-enterprise-versions.js +++ b/tests/routing/deprecated-enterprise-versions.js @@ -87,7 +87,10 @@ describe('deprecation banner', () => { test('deprecation warning banner says "will be discontinued" when date is in future', async () => { const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.oldestSupported}`) - expect($('.deprecation-banner b').text().includes('will be discontinued')).toBe(true) + const expectedString = enterpriseServerReleases.isOldestReleaseDeprecated + ? 'was discontinued' + : 'will be discontinued' + expect($('.deprecation-banner b').text().includes(expectedString)).toBe(true) }) test('deprecation warning banner says "was discontinued" when date is in past', async () => { @@ -96,6 +99,30 @@ describe('deprecation banner', () => { }) }) +describe('does not render helpfulness prompt or contribution button', () => { + test('does not render helpfulness prompt', async () => { + let $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}/github`) + expect($('.js-helpfulness').length).toBeGreaterThan(0) + $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.oldestSupported}/github`) + if (enterpriseServerReleases.isOldestReleaseDeprecated) { + expect($('.js-helpfulness').length).toBe(0) + } else { + expect($('.js-helpfulness').length).toBeGreaterThan(0) + } + }) + + test('does not render contribution button', async () => { + let $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}/github`) + expect($('.contribution').length).toBeGreaterThan(0) + $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.oldestSupported}/github`) + if (enterpriseServerReleases.isOldestReleaseDeprecated) { + expect($('.contribution').length).toBe(0) + } else { + expect($('.js-helpfulness').length).toBeGreaterThan(0) + } + }) +}) + describe('JS and CSS assets', () => { it('returns the expected CSS file > 2.18', async () => { const result = await supertest(app)