Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions .github/workflows/orphaned-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ name: 'Orphaned assets check'
# **Who does it impact**: Docs content.

on:
pull_request:
push:
branches:
- gh-readonly-queue/main/**
workflow_dispatch:
schedule:
- cron: '13 10 * * *' # Once a day at 10:13 UTC

permissions:
contents: read

jobs:
orphaned-assets-check:
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
# Using a PAT is necessary so that the new commit will trigger the
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
token: ${{ secrets.DOCUBOT_REPO_PAT }}

- name: Setup node
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
Expand All @@ -30,4 +34,30 @@ jobs:
run: npm ci

- name: Check for orphaned assets
run: ./script/find-orphaned-assets.mjs --verbose --exit
env:
# Needed for gh
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
run: |
set -e

./script/find-orphaned-assets.mjs | xargs git rm

# If nothing to commit, exit now. It's fine. No orphans.
git status | grep 'nothing to commit' && exit 0

# Replicated from the translation pipeline PR-maker Action
git config --global user.name "docubot"
git config --global user.email "[email protected]"

date=$(date '+%Y-%m-%d-%H-%M')
branchname=orphaned-assets-$date-$GITHUB_RUN_ID

git checkout -b $branchname
git commit -m "Delete orphaned assets $date"
git push origin $branchname

gh pr create \
--title "Delete orphaned assets ($date)" \
--body "Found with the find-orphaned-assets.mjs script" \
--repo github/docs-internal \
--label docs-content-fr
13 changes: 10 additions & 3 deletions script/find-orphaned-assets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ import path from 'path'
import program from 'commander'
import walk from 'walk-sync'

const EXCEPTIONS = new Set(['assets/images/site/favicon.ico'])
const EXCEPTIONS = new Set([
'assets/images/site/favicon.ico',
'assets/images/site/apple-touch-icon.png',
])

function isExceptionPath(imagePath) {
// We also check for .DS_Store because any macOS user that has opened
// a folder with images will have this on disk. It won't get added
// to git anyway thanks to our .DS_Store.
// But if we don't make it a valid exception, it can become inconvenient
// to run this script locally.
return EXCEPTIONS.has(imagePath) || path.basename('.DS_Store')
return (
EXCEPTIONS.has(imagePath) ||
path.basename(imagePath) === '.DS_Store' ||
imagePath.split(path.sep).includes('early-access')
)
}

program
Expand Down Expand Up @@ -61,7 +68,7 @@ async function main(opts) {
root,
Object.assign(
{
globs: ['!**/*.+(png|csv|graphql|json|svg)'],
globs: ['!**/*.+(png|jpe?g|csv|graphql|json|svg)'],
},
walkOptions
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ You can set up automation to scale the number of self-hosted runners. For more i
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.actions.settings-sidebar-actions %}
{% data reusables.actions.settings-sidebar-actions-runners-updated %}
{% data reusables.repositories.settings-sidebar-actions-runners %}
1. Click **New self-hosted runner**.
{% data reusables.actions.self-hosted-runner-configure %}
{% elsif ghae or ghes < 3.4 %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.repositories.settings-sidebar-actions-runners %}
1. GitHub Insightsの
{% ifversion ghes > 3.1 or ghae or ghec %}"ランナー"{% else %}"セルフホストランナー"{% endif %} で、[**Add runner**] をクリックします。
{% data reusables.actions.self-hosted-runner-configure %}
Expand All @@ -72,14 +71,13 @@ You can set up automation to scale the number of self-hosted runners. For more i
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions %}
{% data reusables.actions.settings-sidebar-actions-runners-updated %}
{% data reusables.organizations.settings-sidebar-actions-runners %}
1. Click **New runner**.
{% data reusables.actions.self-hosted-runner-configure %}
{% elsif ghae or ghes < 3.4 %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.organizations.settings-sidebar-actions-runners %}
1. GitHub Insightsの
{% ifversion ghes > 3.1 or ghae %}"Runners", click **Add new**, then click **New runner**.{% elsif ghes < 3.2 %}"Self-hosted runners", click **Add runner**."{% endif %}
{% data reusables.actions.self-hosted-runner-configure %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ When creating a group, you must choose a policy that defines which repositories{
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions-runner-groups %}
{% data reusables.organizations.settings-sidebar-actions-runner-groups %}
1. In the "Runner groups" section, click **New runner group**.
1. Enter a name for your runner group.
{% data reusables.actions.runner-group-assign-policy-repo %}
Expand All @@ -66,7 +66,7 @@ When creating a group, you must choose a policy that defines which repositories{
{% elsif ghae or ghes < 3.4 %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.organizations.settings-sidebar-actions-runner-groups %}
1. Under {% ifversion ghes > 3.1 or ghae %}"Runners"{% elsif ghes < 3.2 %}"Self-hosted runners"{% endif %}, click **Add new**, and then **New group**.

![新しいランナーを追加](/assets/images/help/settings/actions-org-add-runner-group.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ shortTitle: Monitor & troubleshoot
{% data reusables.actions.self-hosted-runner-management-permissions-required %}

{% data reusables.actions.self-hosted-runner-navigate-repo-and-org %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.organizations.settings-sidebar-actions-runners %}
1. Under {% ifversion fpt or ghes > 3.1 or ghae or ghec %}"Runners"{% else %}"Self-hosted runners"{% endif %}, you can view a list of registered runners, including the runner's name, labels, and status.

The status can be one of the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ shortTitle: Remove self-hosted runners
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.actions.settings-sidebar-actions %}
{% data reusables.actions.settings-sidebar-actions-runners-updated %}
{% data reusables.repositories.settings-sidebar-actions-runners %}
{% data reusables.actions.settings-sidebar-actions-runner-selection %}
{% data reusables.actions.self-hosted-runner-removing-a-runner-updated %}
{% elsif ghae or ghes < 3.4 %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.repositories.settings-sidebar-actions-runners %}
{% data reusables.actions.self-hosted-runner-removing-a-runner %}
{% endif %}

Expand All @@ -59,14 +58,13 @@ Organizationからセルフホストランナーを削除するには、Organiza
{% ifversion fpt or ghes > 3.3 or ghec %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions %}
{% data reusables.actions.settings-sidebar-actions-runners-updated %}
{% data reusables.organizations.settings-sidebar-actions-runners %}
{% data reusables.actions.settings-sidebar-actions-runner-selection %}
{% data reusables.actions.self-hosted-runner-removing-a-runner-updated %}
{% elsif ghes < 3.4 or ghae %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.actions.settings-sidebar-actions-runners %}
{% data reusables.organizations.settings-sidebar-actions-runners %}
{% data reusables.actions.self-hosted-runner-removing-a-runner %}
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ Enterprise アカウントの {% data variables.product.prodname_actions %} の
{% data reusables.dotcom_billing.update-spending-limit %}


## Managing usage and spending limit email notifications
## 使用状況の管理と利用上限のメール通知
{% data reusables.billing.email-notifications %}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ topics:

## {% data variables.product.prodname_codespaces %}の価格

{% data variables.product.prodname_codespaces %} usage is billed for all accounts on the Team and Enterprise plans, and does not include any entitlements. 現在の処、個人のアカウントは{% data variables.product.prodname_codespaces %}の利用に対して課金されません。
{% data variables.product.prodname_codespaces %} usage is billed for all accounts on the Team and Enterprise plans, and does not include any entitlements. 現在のところ、個人のアカウントは{% data variables.product.prodname_codespaces %}の利用に対して課金されません。

{% data variables.product.prodname_codespaces %}の利用については、以下の表に示す計測単位に従って課金されます。

Expand Down Expand Up @@ -54,22 +54,22 @@ Microsoft Enterprise Agreement を通じて {% data variables.product.prodname_e

{% data reusables.codespaces.exporting-changes %}

## Limiting the choice of machine types
## マシンタイプの選択の制限

The type of machine a user chooses when they create a codespace affects the per-minute charge for that codespace, as shown above.
ユーザがcodespaceを作成する際に選択するマシンタイプは、上にあるように、そのcodespaceに対する分ごとの課金に影響します。

Organization owners can create a policy to restrict the machine types that are available to users. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
Organizationオーナーは、ユーザが利用できるマシンタイプを制限するポリシーを作成できます。 詳しい情報については「[マシンタイプへのアクセス制限](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)」を参照してください。

## How billing is handled for forked repositories
## フォークされたリポジトリでの支払いの扱い

{% data variables.product.prodname_codespaces %} can only be used in organizations where a billable owner has been defined. To incur charges to the organization, the user must be a member or collaborator, otherwise they cannot create a codespace.
{% data variables.product.prodname_codespaces %}は、支払いできるオーナーが定義されたOrganizationでのみ利用できます。 Organizationに課金をするには、ユーザはメンバーもしくはコラボレータでなければなりません。そうでなければユーザはcodespaceを作成できません。

For example, a user in a private organization can fork a repository within that organization, and can subsequently use a codespace billed to the organization; this is because the organization is the owner of the parent repository, which can remove the user's access, the forked repository, and the codespace.
たとえば、プライベートなOrganizationのユーザは、そのOrganization内のリポジトリをフォークし、その後Organizationに課金されるcodespaceを使うことができます。これはそのOrganizationが、ユーザのアクセス、フォークされたリポジトリ、codespaceを削除できる親リポジトリのオーナーだからです。

## How billing is handled when a repository is transferred
## リポジトリが移譲されたときの支払いの扱い

Usage is billed and reported on every hour. As such, you pay for any usage when a repository is within your organization. When a repository is transferred out of your organization, any codespaces in that repository are removed as part of the transfer process.
使用量は1時間ごとに課金され、報告されます。 そのため、リポジトリがOrganization内にあれば、あらゆる使用に対して支払いをすることになります。 リポジトリがOrganization外に移譲されると、そのリポジトリ内のすべてのcodespaceは移譲のプロセスの一部として削除されます。

## What happens when users are removed
## ユーザが削除されたときに生じること

If a user is removed from an organization or repository, their codespaces are automatically deleted.
Organizationもしくはリポジトリからユーザが削除されると、そのユーザのcodespaceは自動的に削除されます。
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Managing billing for GitHub Codespaces
title: GitHub Codespacesの支払いの管理
shortTitle: Codespaces
intro: '{% data variables.product.prodname_codespaces %} の利用状況を確認し、利用上限を設定することができます。'
versions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Managing spending limits for Codespaces
title: Codespacesの利用制限の管理
intro: '{% data variables.product.prodname_codespaces %} の使用に対して利用上限を設定できます。'
versions:
fpt: '*'
Expand All @@ -20,13 +20,13 @@ shortTitle: 利用上限

{% data reusables.codespaces.codespaces-spending-limit-requirement %}

Once you've reached your spending limit, your organization or repository will no longer be able to create new codespaces, and won't be able to start existing codespaces. Any existing codespaces that are still running will not be shutdown; if you don't change the spending limit, you will not be charged for the amount that exceeds the limit.
使用上限に達すると、Organizationあるいはリポジトリではそれ以上新しいcodespaceを作成できなくなり、既存のcodespaceも起動できなくなります。 まだ実行中の既存のcodespaceはシャットダウンされません。使用上限を変更しなければ、上限を超えた分に対する支払いは生じません。

{% data variables.product.prodname_codespaces %}の価格に関する詳細な情報については、「[{% data variables.product.prodname_codespaces %}の支払いについて](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces)」を参照してください。

{% ifversion ghec %}
## Using your Azure Subscription
If you purchased {% data variables.product.prodname_enterprise %} through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for {% data variables.product.prodname_codespaces %} usage. 詳しい情報については、「[Azure サブスクリプションを Enterprise に接続する](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)」を参照してください。
## Azureサブスクリプションの利用
Microsoft Enterprise Agreement を通じて {% data variables.product.prodname_enterprise %} を購入した場合、Azure サブスクリプションID をEnterpriseアカウントに接続して、 {% data variables.product.prodname_codespaces %} の使用を有効にして支払うことができます。 詳しい情報については、「[Azure サブスクリプションを Enterprise に接続する](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)」を参照してください。
{% endif %}

## Organizationの {% data variables.product.prodname_codespaces %} に対する利用上限を管理する
Expand All @@ -45,22 +45,22 @@ Enterprise アカウントの {% data variables.product.prodname_codespaces %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.billing-tab %}
1. Above "{% data variables.product.prodname_codespaces %} monthly usage", click **Spending Limit**. ![利用上限タブ](/assets/images/help/settings/spending-limit-tab-enterprise.png)
1. ""[{% data variables.product.prodname_codespaces %} monthly usage]"の上で、**Spending Limit(利用上限)**をクリックしてください。 ![利用上限タブ](/assets/images/help/settings/spending-limit-tab-enterprise.png)
{% data reusables.dotcom_billing.monthly-spending-limit %}
{% data reusables.dotcom_billing.update-spending-limit %}

## Exporting changes when you have reached your spending limit
## 利用上限に達した際の変更のエクスポート

{% data reusables.codespaces.exporting-changes %}
## Managing usage and spending limit email notifications
## 使用状況の管理と利用上限のメール通知

Email notifications are sent to account owners and billing managers when spending reaches 50%, 75%, 90%, and 100% of your account's spending limit.
メール通知は、利用量がアカウントの利用上限の50%、75%90%100%に達したときに、アカウントのオーナーと支払いマネージャーに送信されます。

You can disable these notifications anytime by navigating to the bottom of the **Spending Limit** page.
これらの通知は、**Spending Limit(利用上限)** ページの下部にアクセスしていつでも無効化できます。

![Screenshot of the billing email notification settings](/assets/images/help/billing/codespaces-spending-limit-notifications.png)
![支払いのメール通知設定のスクリーンショット](/assets/images/help/billing/codespaces-spending-limit-notifications.png)

## 参考リンク

- "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)"
- "[Managing billing for Codespaces in your organization](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization)"
- 「[マシンタイプへのアクセスの制限](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)
- 「[Organization内のCodespacesの支払いの管理](/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization)
Loading