Merge branch 'main' into broken-links

This commit is contained in:
mc 2021-01-22 19:30:03 +00:00 коммит произвёл GitHub
Родитель 57048a32c5 a122f0fcb8
Коммит ca3a4e481f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 43 добавлений и 10 удалений

Двоичные данные
assets/images/help/desktop/delete-tag-multiple.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 69 KiB

Двоичные данные
assets/images/help/desktop/select-delete-tag.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 67 KiB

Просмотреть файл

@ -34,3 +34,14 @@ versions:
3. All tags associated with the commit are visible in that commit's metadata. 3. All tags associated with the commit are visible in that commit's metadata.
![Viewing a tag in the commit](/assets/images/help/desktop/viewing-tags-in-commit.png) ![Viewing a tag in the commit](/assets/images/help/desktop/viewing-tags-in-commit.png)
### Deleting tags
{% note %}
**Note**: You can only delete tags associated with commits that have not yet been pushed.
{% endnote %}
{% data reusables.desktop.history-tab %}
{% data reusables.desktop.delete-tag %}

Просмотреть файл

@ -13,14 +13,13 @@ When you block a user, you can choose to block them indefinitely or for a specif
{% tip %} {% tip %}
**Tip:** If you're blocking a user because of a heated conversation, consider [locking the conversation](/articles/locking-conversations) so only collaborators can comment. **Tip:** If you're blocking a user because of a heated conversation, consider locking the conversation so only collaborators can comment. For more information, see "[Locking conversations](/github/building-a-strong-community/locking-conversations)."
{% endtip %} {% endtip %}
At the time that you block a user from your organization: At the time that you block a user from your organization:
- The user stops watching your organization's repositories - The user stops watching your organization's repositories
- The user's stars and issue assignments are removed from your repositories - The user's stars and issue assignments are removed from your repositories
- The user's forks of your organization's repositories are deleted
- The user's votes on discussions or comments in your organization's repositories are deleted - The user's votes on discussions or comments in your organization's repositories are deleted
- The user is removed as a collaborator on your organization's repositories - The user is removed as a collaborator on your organization's repositories
- The user's contributions to your organization's repositories are no longer counted as contributions for them - The user's contributions to your organization's repositories are no longer counted as contributions for them

Просмотреть файл

@ -9,11 +9,11 @@ versions:
### About blocking users ### About blocking users
You can block a user in your account settings or from the user's profile. {% data variables.product.prodname_dotcom %} will not notify the user when you block them. If you want to avoid contributing to the same project as someone you've blocked, you can [choose to display a warning](/articles/blocking-a-user-from-your-personal-account/#blocking-a-user-in-your-account-settings) on any repositories with prior contributions from a blocked user. You may still see the activity of blocked users in shared spaces and blocked users can delete their existing content. You can block a user in your account settings or from the user's profile. {% data variables.product.prodname_dotcom %} will not notify the user when you block them. If you want to avoid contributing to the same project as someone you've blocked, you can choose to display a warning on any repositories with prior contributions from a blocked user. For more information, see "[Blocking a user in your account settings](#blocking-a-user-in-your-account-settings)." You may still see the activity of blocked users in shared spaces and blocked users can delete their existing content.
{% tip %} {% tip %}
**Tip:** If you're blocking a user because of a heated conversation, consider [locking the conversation](/articles/locking-conversations) so only collaborators can comment. **Tip:** If you're blocking a user because of a heated conversation, consider locking the conversation so only collaborators can comment. For more information, see "[Locking conversations](/github/building-a-strong-community/locking-conversations)."
{% endtip %} {% endtip %}
@ -22,8 +22,6 @@ When you block a user:
- The user stops watching and unpins your repositories - The user stops watching and unpins your repositories
- The user is not able to join any organizations you are an owner of - The user is not able to join any organizations you are an owner of
- The user's stars and issue assignments are removed from your repositories - The user's stars and issue assignments are removed from your repositories
- The user's forks of your repositories are deleted
- You delete any forks of the user's repositories
- The user's votes on discussions or comments in your repositories are deleted - The user's votes on discussions or comments in your repositories are deleted
- The user is removed as a collaborator on your repositories - The user is removed as a collaborator on your repositories
- The user's contributions to your repositories are no longer counted as contributions for them - The user's contributions to your repositories are no longer counted as contributions for them

Просмотреть файл

@ -54,6 +54,8 @@ GitHub will display your profile README on your profile page if all of the follo
The generated README file is pre-populated with a template to give you some inspiration for your profile README. The generated README file is pre-populated with a template to give you some inspiration for your profile README.
![README file with pre-populated template](/assets/images/help/repository/personal-repository-readme-template.png) ![README file with pre-populated template](/assets/images/help/repository/personal-repository-readme-template.png)
For a summary of all the available emojis and their codes, see "[Emoji cheat sheet](http://www.emoji-cheat-sheet.com/)."
### Removing a profile README ### Removing a profile README
The profile README is removed from your {% data variables.product.prodname_dotcom %} profile if any of the following apply: The profile README is removed from your {% data variables.product.prodname_dotcom %} profile if any of the following apply:

Просмотреть файл

@ -0,0 +1,6 @@
1. Right-click the commit.
- If a commit has only one tag, click **Delete Tag TAG NAME**.
![Select the delete tag menu item](/assets/images/help/desktop/select-delete-tag.png)
- If a commit has multiple tags, hover over **Delete Tag...** and then click the tag that you want to delete.
![Hover over the delete tag menu](/assets/images/help/desktop/delete-tag-multiple.png)

Просмотреть файл

@ -4,7 +4,7 @@ const Liquid = require('liquid')
const liquid = new Liquid.Engine() const liquid = new Liquid.Engine()
const LiquidTag = require('./liquid-tag') const LiquidTag = require('./liquid-tag')
const findPage = require('../find-page') const findPage = require('../find-page')
const { getPathWithoutLanguage } = require('../path-utils') const { getPathWithoutLanguage, getPathWithoutVersion } = require('../path-utils')
const getApplicableVersions = require('../get-applicable-versions') const getApplicableVersions = require('../get-applicable-versions')
const removeFPTFromPath = require('../remove-fpt-from-path') const removeFPTFromPath = require('../remove-fpt-from-path')
@ -74,7 +74,7 @@ module.exports = class Link extends LiquidTag {
} }
// add language code and version // add language code and version
fullPath = removeFPTFromPath(path.posix.join('/', ctx.currentLanguage, ctx.currentVersion, getPathWithoutLanguage(fullPath))) fullPath = removeFPTFromPath(path.posix.join('/', ctx.currentLanguage, ctx.currentVersion, getPathWithoutLanguage(getPathWithoutVersion(fullPath))))
// find the page based on the full path // find the page based on the full path
const page = findPage(fullPath, ctx.pages, ctx.redirects) const page = findPage(fullPath, ctx.pages, ctx.redirects)

Просмотреть файл

@ -22,7 +22,12 @@ function getPathWithoutLanguage (href) {
// Remove the version segment from the path // Remove the version segment from the path
function getPathWithoutVersion (href) { function getPathWithoutVersion (href) {
return href.replace(`/${getVersionStringFromPath(href)}`, '') const versionFromPath = getVersionStringFromPath(href)
// If the derived version is not found in the list of all versions, just return the HREF
return allVersions[versionFromPath]
? href.replace(`/${getVersionStringFromPath(href)}`, '')
: href
} }
// Return the version segment in a path // Return the version segment in a path

Просмотреть файл

@ -1,6 +1,7 @@
/* global page, browser */ /* global page, browser */
const sleep = require('await-sleep') const sleep = require('await-sleep')
const querystring = require('querystring') const querystring = require('querystring')
const { latest } = require('../../lib/enterprise-server-releases')
describe('homepage', () => { describe('homepage', () => {
jest.setTimeout(60 * 1000) jest.setTimeout(60 * 1000)
@ -235,6 +236,17 @@ describe('card filters', () => {
expect(shownCards.length).toBeGreaterThan(0) expect(shownCards.length).toBeGreaterThan(0)
}) })
it('works with select input on an Enterprise version', async () => {
await page.goto(`http://localhost:4001/en/enterprise-server@${latest}/actions/guides`)
await page.select('.js-filter-card-filter-dropdown[name="type"]', 'overview')
const shownCards = await page.$$('.js-filter-card:not(.d-none)')
const shownCardsAttrib = await page.$$eval('.js-filter-card:not(.d-none)', cards =>
cards.map(card => card.dataset.type)
)
shownCardsAttrib.map(attrib => expect(attrib).toBe('overview'))
expect(shownCards.length).toBeGreaterThan(0)
})
it('shows more cards', async () => { it('shows more cards', async () => {
await page.goto('http://localhost:4001/en/actions') await page.goto('http://localhost:4001/en/actions')
const maxCards = await page.$eval('.js-filter-card-show-more', btn => parseInt(btn.dataset.jsFilterCardMax)) const maxCards = await page.$eval('.js-filter-card-show-more', btn => parseInt(btn.dataset.jsFilterCardMax))