Skip to content

Commit

Permalink
Merge branch 'github:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-opolka committed Jun 17, 2023
2 parents 530f928 + ae5c399 commit 8ee0016
Show file tree
Hide file tree
Showing 530 changed files with 228,793 additions and 23,939 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codeowners-docs-engineering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- '**.tsx'
- '**.scss'
- 'src/**'
- '!src/**.json' # So that Docs Engineering isn't reviewing OpenAPI PRs
- '.github/**'
- '**Dockerfile'
- 'package*.json'
Expand Down
67 changes: 30 additions & 37 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
console.log('Closed pull request', prNumber)
}
console.log('Close any existing pull requests')
console.log('Closing any existing pull requests')
const { data: existingPulls } = await github.rest.pulls.list({ owner, repo, head, base })
if (existingPulls.length) {
console.log('Found existing pull requests', existingPulls.map(pull => pull.number))
Expand All @@ -67,78 +67,71 @@ jobs:
console.log('Closed existing pull requests')
}
console.log('Create a new pull request')
console.log('Creating a new pull request')
const body = `
This is an automated pull request to sync changes between the public and private repos.
Our bot will merge this pull request automatically.
To preserve continuity across repos, _do not squash_ this pull request.
`
let pull
let pull, pull_number
try {
pull = (await github.rest.pulls.create({
const response = await github.rest.pulls.create({
owner,
repo,
head,
base,
title: 'Repo sync',
body,
})).data
})
pull = response.data
pull_number = pull.number
console.log('Created pull request successfully', pull.html_url)
} catch (err) {
// Don't error/alert if there's no commits to sync
if (err.message?.includes('No commits')) {
console.log(err.message)
return
}
throw err
}
console.log('Created pull request successfully', pull.html_url)
console.log('Count files')
const { data: prFiles } = await github.rest.pulls.listFiles({ owner, repo, pull_number: pull.number })
if (!prFiles.length) {
console.log('No files changed, closing')
await closePullRequest(pull.number)
return
}
console.log('Check mergeable')
if (!pull.mergeable) {
console.log('Pull request is not mergeable, closing')
await closePullRequest(pull.number)
return
}
console.log('Lock conversations')
console.log('Locking conversations to prevent spam')
try {
await github.rest.issues.lock({
...context.repo,
issue_number: pull.number,
issue_number: pull_number,
lock_reason: 'spam'
})
console.log('Locked the pull request to prevent spam!')
console.log('Locked the pull request to prevent spam')
} catch (error) {
console.error('Failed to lock the pull request.', error)
// Don't fail the workflow
}
console.log('Approve pull request')
try {
await github.rest.pulls.createReview({
owner,
repo,
pull_number: pull.number,
event: 'APPROVE',
})
} catch (error) {
console.error('Failed to approve the pull request.', error)
// Don't fail the workflow
console.log('Counting files changed')
const { data: prFiles } = await github.rest.pulls.listFiles({ owner, repo, pull_number })
if (prFiles.length) {
console.log(prFiles.length, 'files have changed')
} else {
console.log('No files changed, closing')
await closePullRequest(pull_number)
return
}
console.log('Checking for merge conflicts')
if (pull.mergeable_state === 'dirty') {
console.log('Pull request has a conflict', pull.html_url)
await closePullRequest(pull_number)
throw new Error('Pull request has a conflict, please resolve manually')
}
console.log('No detected merge conflicts')
console.log('Admin merge the pull request')
console.log('Merging the pull request')
// Admin merge pull request to avoid squash
await github.rest.pulls.merge({
owner,
repo,
pull_number: pull.number,
pull_number,
merge_method: 'merge',
})
// Error loud here, so no try/catch
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sync-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
- uses: ./.github/actions/node-npm-setup

- name: Sync the REST, Webhooks, and GitHub Apps schemas
env:
# Needed for gh
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_FR }}
run: |
src/rest/scripts/update-files.js --source-repo rest-api-description --output rest github-apps webhooks rest-redirects
git status
Expand Down
Binary file modified assets/images/help/codespaces/maximum-minutes-timeout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions components/article/ArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Callout } from 'components/ui/Callout'
import { DefaultLayout } from 'components/DefaultLayout'
import { ArticleTitle } from 'components/article/ArticleTitle'
import { useArticleContext } from 'components/context/ArticleContext'
import { LearningTrackNav } from './LearningTrackNav'
import { LearningTrackNav } from 'src/learning-track/components/article/LearningTrackNav'
import { MarkdownContent } from 'components/ui/MarkdownContent'
import { Lead } from 'components/ui/Lead'
import { PermissionsStatement } from 'components/ui/PermissionsStatement'
Expand All @@ -16,7 +16,7 @@ import { ArticleInlineLayout } from './ArticleInlineLayout'
import { PlatformPicker } from 'components/article/PlatformPicker'
import { ToolPicker } from 'components/article/ToolPicker'
import { MiniTocs } from 'components/ui/MiniTocs'
import { LearningTrackCard } from 'components/article/LearningTrackCard'
import { LearningTrackCard } from 'src/learning-track/components/article/LearningTrackCard'
import { RestRedirect } from 'src/rest/components/RestRedirect'
import { Breadcrumbs } from 'components/page-header/Breadcrumbs'
import { Link } from 'components/Link'
Expand Down
23 changes: 12 additions & 11 deletions components/ui/MarkdownContent/stylesheets/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
font-size: 90%;
width: 100%;
line-height: 1.5;
/* We want to keep table-layout: auto so that column widths dynamically adjust;
otherwise entries get needlessly squashed into narrow columns. As a workaround,
we use components/lib/wrap-code-terms.js to prevent some reference table content
from expanding beyond the horizontal boundaries of the parent element. */
table-layout: auto;

/* For mobile (small viewports) we need to fix the table because if the table
is larger than the viewport it will force the width of the table causing issues
with the header on scroll
*/
@media (max-width: 544px) {
table-layout: fixed;
// For mobile (small viewports) we need to fix the table
// because if the table is larger than the viewport
// it will force the width of the table causing issues
// with the header on scroll
table-layout: fixed;

// We want to keep table-layout: auto so that column widths dynamically adjust;
// otherwise entries get needlessly squashed into narrow columns. As a workaround,
// we use components/lib/wrap-code-terms.js to prevent some reference table content
// from expanding beyond the horizontal boundaries of the parent element.
@media (min-width: 544px) {
table-layout: auto;
}

code {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When you sign up for an account, {% data variables.product.product_name %} provi

**Note{% ifversion ghec %}s{% endif %}**: {% ifversion ghec %}

* {% endif %}Your profile picture should be a PNG, JPG, or GIF file, and it must be less than 1 MB in size and smaller than 3000 by 3000 pixels. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels.
- {% endif %}Your profile picture should be a PNG, JPG, or GIF file, and it must be less than 1 MB in size and smaller than 3000 by 3000 pixels. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels.
{% ifversion ghec %}* Gravatar profile pictures are not supported with {% data variables.product.prodname_emus %}.{% endif %}

{% endnote %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ topics:
- Accounts
shortTitle: Your personal dashboard
---

{% ifversion global-nav-update %}
{% data reusables.navigation.global-nav-beta-note %}
{% endif %}

## Accessing your personal dashboard

Your personal dashboard is the first page you'll see when you sign in on {% data variables.product.product_name %}.
Expand All @@ -31,7 +36,14 @@ In the "Recent activity" section of your news feed, you can quickly find and fol

## Finding your top repositories and teams

{% ifversion global-nav-update %}
In the global navigation menu, you can access the top repositories and teams you use. To open the menu, select {% octicon "three-bars" aria-label="Open global navigation menu" %} at the top left of any page.

![Screenshot of the navigation bar on {% data variables.product.product_name %}. The "Open global navigation menu" icon is outlined in dark orange.](/assets/images/help/navigation/global-navigation-menu-icon.png)

{% else %}
In the left sidebar of your dashboard, you can access the top repositories and teams you use.
{% endif %}

The list of top repositories is automatically generated, and can include any repository you have interacted with, whether it's owned directly by your account or not. Interactions include making commits and opening or commenting on issues and pull requests. The list of top repositories cannot be edited, but repositories will drop off the list {% ifversion ghes < 3.6 or ghae < 3.6 %}4 months{% else %}1 year{% endif %} after you last interacted with them.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ shortTitle: User into an organization

**Warning**: Before converting a user into an organization, keep these points in mind.

* You will **no longer** be able to sign into the converted personal account.
* You will **no longer** be able to create or modify gists owned by the converted personal account.
* An organization **cannot** be converted back to a user.
* The SSH keys, OAuth tokens, job profile, reactions, and associated user information, **will not** be transferred to the organization. This is only true for the personal account that's being converted, not any of the personal account's collaborators.
* Any {% data variables.product.prodname_github_apps %} installed on the converted personal account will be uninstalled.
* Any commits made with the converted personal account **will no longer be linked** to that account. The commits themselves **will** remain intact.
* Any existing comments made by the converted personal account **will no longer be linked** to that account. The comments themselves **will** remain intact, but will be associated with the `ghost` user.
* Any forks of private repositories made with the converted personal account will be deleted.
- You will **no longer** be able to sign into the converted personal account.
- You will **no longer** be able to create or modify gists owned by the converted personal account.
- An organization **cannot** be converted back to a user.
- The SSH keys, OAuth tokens, job profile, reactions, and associated user information, **will not** be transferred to the organization. This is only true for the personal account that's being converted, not any of the personal account's collaborators.
- Any {% data variables.product.prodname_github_apps %} installed on the converted personal account will be uninstalled.
- Any commits made with the converted personal account **will no longer be linked** to that account. The commits themselves **will** remain intact.
- Any existing comments made by the converted personal account **will no longer be linked** to that account. The comments themselves **will** remain intact, but will be associated with the `ghost` user.
- Any forks of private repositories made with the converted personal account will be deleted.
{% endwarning %}

{% ifversion fpt or ghec or ghes %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ jobs:
Invoke-Pester Unit.Tests.ps1 -Passthru
```
* `shell: pwsh` - Configures the job to use PowerShell when running the `run` commands.
* `run: Test-Path resultsfile.log` - Check whether a file called `resultsfile.log` is present in the repository's root directory.
* `Should -Be $true` - Uses Pester to define an expected result. If the result is unexpected, then {% data variables.product.prodname_actions %} flags this as a failed test. For example:
- `shell: pwsh` - Configures the job to use PowerShell when running the `run` commands.
- `run: Test-Path resultsfile.log` - Check whether a file called `resultsfile.log` is present in the repository's root directory.
- `Should -Be $true` - Uses Pester to define an expected result. If the result is unexpected, then {% data variables.product.prodname_actions %} flags this as a failed test. For example:

![Screenshot of a workflow run failure for a Pester test. Test reports "Expected $true, but got $false" and "Error: Process completed with exit code 1."](/assets/images/help/repository/actions-failed-pester-test-updated.png)

* `Invoke-Pester Unit.Tests.ps1 -Passthru` - Uses Pester to execute tests defined in a file called `Unit.Tests.ps1`. For example, to perform the same test described above, the `Unit.Tests.ps1` will contain the following:
- `Invoke-Pester Unit.Tests.ps1 -Passthru` - Uses Pester to execute tests defined in a file called `Unit.Tests.ps1`. For example, to perform the same test described above, the `Unit.Tests.ps1` will contain the following:
```
Describe "Check results file is present" {
It "Check results file is present" {
Expand Down
18 changes: 9 additions & 9 deletions content/actions/creating-actions/about-custom-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,17 @@ We recommend creating a README file to help people learn how to use your action.
While both {% data variables.product.prodname_actions %} and {% data variables.product.prodname_github_apps %} provide ways to build automation and workflow tools, they each have strengths that make them useful in different ways.

{% data variables.product.prodname_github_apps %}:
* Run persistently and can react to events quickly.
* Work great when persistent data is needed.
* Work best with API requests that aren't time consuming.
* Run on a server or compute infrastructure that you provide.
- Run persistently and can react to events quickly.
- Work great when persistent data is needed.
- Work best with API requests that aren't time consuming.
- Run on a server or compute infrastructure that you provide.

{% data variables.product.prodname_actions %}:
* Provide automation that can perform continuous integration and continuous deployment.
* Can run directly on runner machines or in Docker containers.
* Can include access to a clone of your repository, enabling deployment and publishing tools, code formatters, and command line tools to access your code.
* Don't require you to deploy code or serve an app.
* Have a simple interface to create and use secrets, which enables actions to interact with third-party services without needing to store the credentials of the person using the action.
- Provide automation that can perform continuous integration and continuous deployment.
- Can run directly on runner machines or in Docker containers.
- Can include access to a clone of your repository, enabling deployment and publishing tools, code formatters, and command line tools to access your code.
- Don't require you to deploy code or serve an app.
- Have a simple interface to create and use secrets, which enables actions to interact with third-party services without needing to store the credentials of the person using the action.

## Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,5 @@ Click **Hello world action step**, and you should see "Hello Mona the Octocat" o
{% data variables.product.prodname_dotcom %} provides template repositories for creating JavaScript and TypeScript actions. You can use these templates to quickly get started with creating a new action that includes tests, linting, and other recommended practices.
* [`javascript-action` template repository](https://github.com/actions/javascript-action)
* [`typescript-action` template repository](https://github.com/actions/typescript-action)
- [`javascript-action` template repository](https://github.com/actions/javascript-action)
- [`typescript-action` template repository](https://github.com/actions/typescript-action)
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For a full example of how to set up this action, see [example-setup-gh](https://

This pattern is employed in several actions. For more examples, see:

* [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby)
* [`google-github-actions/setup-gcloud`](https://github.com/google-github-actions/setup-gcloud)
* [`hashicorp/setup-terraform`](https://github.com/hashicorp/setup-terraform)
- [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby)
- [`google-github-actions/setup-gcloud`](https://github.com/google-github-actions/setup-gcloud)
- [`hashicorp/setup-terraform`](https://github.com/hashicorp/setup-terraform)

Loading

0 comments on commit 8ee0016

Please sign in to comment.