From 0c374c9586ee02947e423aea6c28e92f969d7d38 Mon Sep 17 00:00:00 2001 From: Steve Guntrip <12534592+stevecat@users.noreply.github.com> Date: Thu, 25 Nov 2021 08:48:46 +0000 Subject: [PATCH 1/2] Expose external groups to AE, version note --- content/rest/reference/teams.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/rest/reference/teams.md b/content/rest/reference/teams.md index bf75d3094f..2e05e37ba8 100644 --- a/content/rest/reference/teams.md +++ b/content/rest/reference/teams.md @@ -52,13 +52,14 @@ This API is only available to authenticated members of the team's organization. {% if operation.subcategory == 'members' %}{% include rest_operation %}{% endif %} {% endfor %} -{% ifversion ghec %} +{% ifversion ghec or ghae %} ## External groups The external groups API allows you to view the external identity provider groups that are available to your organization and manage the connection between external groups and teams in your organization. To use this API, the authenticated user must be a team maintainer or an owner of the organization associated with the team. +{% ifversion ghec %} {% note %} **Notes:** @@ -67,6 +68,7 @@ To use this API, the authenticated user must be a team maintainer or an owner of - If your organization uses team synchronization, you can use the Team Synchronization API. For more information, see "[Team synchronization API](#team-synchronization)." {% endnote %} +{% endif %} {% for operation in currentRestOperations %} {% if operation.subcategory == 'external-groups' %}{% include rest_operation %}{% endif %} From 6275cd107162c3da9adf6d1d2c7fb73a2e174ce8 Mon Sep 17 00:00:00 2001 From: Marcelo Jacobus Date: Thu, 25 Nov 2021 05:56:20 -0300 Subject: [PATCH 2/2] Add script to spot differences in liquid tags (#22962) * Add script to spot differences in liquid tags It compares source and translation Usage example: ```bash script/i18n/liquid-diff.js {files} --language=es ``` --- script/i18n/liquid-diff.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 script/i18n/liquid-diff.js diff --git a/script/i18n/liquid-diff.js b/script/i18n/liquid-diff.js new file mode 100755 index 0000000000..ef096aea6c --- /dev/null +++ b/script/i18n/liquid-diff.js @@ -0,0 +1,32 @@ +#!/usr/bin/env node + +import program from 'commander' +import { compareLiquidTags } from '../../lib/liquid-tags/tokens.js' +import languages from '../../lib/languages.js' + +program + .argument('', 'The file name(s) without the language dir. \nI.E. content/foo.md') + .description('Shows the differences of liquid tags between two files') + .requiredOption('-l, --language ', `Choose one of these languages to compare: ${Object.keys(languages).filter(l => l !== 'en')}`) + .parse(process.argv) + +function reportFileDifference(diff) { + console.log(`File: ${diff.file}`) + console.log(`Translation: ${diff.translation}`) + console.log(`Differences:`) + console.log(diff.diff.output) +} + +function main() { + const files = program.args + const options = program.opts() + + files.forEach((file) => { + const language = languages[options.language] + if (!language) throw new Error(`${options.language} is not a recognized language`) + const diff = compareLiquidTags(file, language) + reportFileDifference(diff) + }) +} + +main()