Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #36992

Merged
merged 5 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
63 changes: 34 additions & 29 deletions .github/actions/get-changed-files/get-changed-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,15 @@ then
fi

if [ -z "$DIFF" ]; then
# If HEAD was set from gh pr view but INPUT_HEAD is empty, use HEAD instead
if [ -z "$INPUT_HEAD" ] && [ -n "$HEAD" ]; then
INPUT_HEAD=$HEAD
fi
echo "__ using branch name $INPUT_HEAD __"
git fetch origin main --depth 1
git fetch origin $INPUT_HEAD:refs/remotes/origin/$INPUT_HEAD
echo "__ running git diff __"

temp_file=$(mktemp)
git diff --name-only origin/main $INPUT_HEAD > "$temp_file" 2>/dev/null
GIT_EXIT_CODE=$?

DIFF=$(cat "$temp_file")
rm -f "$temp_file"

if [ $GIT_EXIT_CODE -ne 0 ]; then
echo "__ git diff failed with exit code $GIT_EXIT_CODE, fetching unshallow __"
git fetch --depth=100 origin $INPUT_HEAD
git diff --name-only origin/main $INPUT_HEAD > "$temp_file" 2>/dev/null
DIFF=$(cat "$temp_file")
rm -f "$temp_file"
else
echo "__ git diff succeeded __"
fi
DIFF=$(git diff --name-only origin/main origin/$INPUT_HEAD)
fi

# So we can inspect the output
Expand Down Expand Up @@ -79,20 +68,36 @@ FORMATTED_DIFF=$(echo "$DIFF" | tr '\n' ' ' | tr -s ' ' | sed 's/^ *//' | sed 's
echo "Formatted diff: '$FORMATTED_DIFF'"

# Set the output for GitHub Actions
if [[ -n "$INPUT_OUTPUT_FILE" ]]; then
ALL_FORMATTED=$(echo "$DIFF" | tr '\n' ' ' | tr -s ' ' | sed 's/^ *//' | sed 's/ *$//')
ALL_FORMATTED=$(echo "$DIFF" | tr '\n' ' ' | tr -s ' ' | sed 's/^ *//' | sed 's/ *$//')
HAS_CHANGES=true
if [[ -z "$ALL_FORMATTED" ]]; then
echo "No changed files detected"
HAS_CHANGES=false
fi

# Function to set outputs either to a file or GITHUB_OUTPUT
set_outputs() {
local target=$1

# Only set outputs if there are actually changed files
if [[ -z "$ALL_FORMATTED" ]]; then
echo "No changed files detected, setting empty outputs"
echo "all_changed_files=" >> "$INPUT_OUTPUT_FILE"
echo "filtered_changed_files=" >> "$INPUT_OUTPUT_FILE"
if [[ "$HAS_CHANGES" == "false" ]]; then
echo "Setting empty outputs to $target"
echo "all_changed_files=" >> "$target"
echo "filtered_changed_files=" >> "$target"
else
echo "Setting non-empty outputs"
echo "all_changed_files=$ALL_FORMATTED" >> "$INPUT_OUTPUT_FILE"
echo "filtered_changed_files=$FORMATTED_DIFF" >> "$INPUT_OUTPUT_FILE"
echo "Setting non-empty outputs to $target"
echo "all_changed_files<<EOF" >> "$target"
echo "$ALL_FORMATTED" >> "$target"
echo "EOF" >> "$target"

echo "filtered_changed_files<<EOF" >> "$target"
echo "$FORMATTED_DIFF" >> "$target"
echo "EOF" >> "$target"
fi
}

# Set outputs to the appropriate target
if [[ -n "$INPUT_OUTPUT_FILE" ]]; then
set_outputs "$INPUT_OUTPUT_FILE"
else
echo "all_changed_files='$DIFF'"
echo "filtered_changed_files='$FORMATTED_DIFF'"
set_outputs "$GITHUB_OUTPUT"
fi
1 change: 1 addition & 0 deletions .github/workflows/reviewers-legal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
uses: ./.github/actions/get-changed-files
with:
files: 'content/**'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Node and dependencies
if: steps.changed_files.outputs.filtered_changed_files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ During development, you can visit any page on `http://localhost:4000` and add `?

## Working with liquid processing

If your text or code example includes content between curly brackets (`{` and `}`), you need to wrap it between <code>&#123% raw %&#125;</code> and <code>&#123% raw %&#125;</code> tags to disable Liquid processing for that section. For example:
If your text or code example includes content between curly brackets (`{` and `}`), you need to wrap it between <code>&#123;% raw %&#125;</code> and <code>&#123;% raw %&#125;</code> tags to disable Liquid processing for that section. For example:

* **Use:**

<pre>
GITHUB_TOKEN: &#123% raw %&#125;${% raw %}{{ secrets.GITHUB_TOKEN }}{% endraw %}&#123% endraw %&#125;
GITHUB_TOKEN: &#123;% raw %&#125;${% raw %}{{ secrets.GITHUB_TOKEN }}{% endraw %}&#123;% endraw %&#125;
</pre>

* **Avoid:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ For tables that use symbols:

* Populate all cells. For example in a permissions table, do not mark only the cells for things that require a permission.
* Use octicons or SVG. Do not use emoji. For more information about octicons, see [AUTOTITLE](/contributing/syntax-and-versioning-for-github-docs/using-markdown-and-liquid-in-github-docs#octicons).
* Use a [check mark](https://primer.style/octicons/check-16) for affirmative values ("Yes", "Required", "Supported") and a [cross](https://primer.style/octicons/x-16) for negative values ("No", "Optional", "Unsupported").
* Use a [check mark](https://primer.style/octicons/icon/check-16) for affirmative values ("Yes", "Required", "Supported") and a [cross](https://primer.style/octicons/icon/x-16) for negative values ("No", "Optional", "Unsupported").
* Use `aria-label` to describe the meaning of the symbol, not its visual characteristics. For example, "Required", not "Check mark icon".

Where table data is not truly binary (every value is either "Yes" or "No", for example), text values may be needed in addition to, or instead of, symbols. For example on the page [AUTOTITLE](/support/learning-about-github-support/about-github-support), some features are marked as "Available to purchase".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Keys should be used to explain shapes, colors, or other visual elements. Keys ca

### Colors

If a diagram needs color, use colors defined in the [Primer Design System](https://primer.style/design/foundations/color). To make diagrams accessible to more people, color cannot be the only way to convey information. For example, if you use color to indicate a relationship, you must also use a line or other visual element to convey the same information.
If a diagram needs color, use colors defined in the [Primer Design System](https://primer.style/product/getting-started/foundations/color-usage). To make diagrams accessible to more people, color cannot be the only way to convey information. For example, if you use color to indicate a relationship, you must also use a line or other visual element to convey the same information.

The preferred colors for diagrams in {% data variables.product.prodname_docs %} are:

Expand All @@ -205,7 +205,7 @@ If you need to create a diagram that is difficult to view at small resolutions,

## Tools for creating diagrams

The recommended tool for using diagrams is Figma so that you have access to Primer colors and other assets. However, you can use another program if you prefer. Follow the shape conventions in the style guide above and use the colors defined in the [Primer Design System](https://primer.style/design/foundations/color#how-to-use-color-for-product-ui).
The recommended tool for using diagrams is Figma so that you have access to Primer colors and other assets. However, you can use another program if you prefer. Follow the shape conventions in the style guide above and use the colors defined in the [Primer Design System](https://primer.style/product/getting-started/foundations/color-usage).

## Accessibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ For an example of an article that uses code annotations on {% data variables.pro

## Octicons

Octicons are icons used across {% data variables.product.prodname_dotcom %}’s interface. We reference Octicons when documenting the user interface and to indicate binary values in tables. Find the name of specific Octicons on the [Octicons site](https://primer.style/Octicons).
Octicons are icons used across {% data variables.product.prodname_dotcom %}’s interface. We reference Octicons when documenting the user interface and to indicate binary values in tables. Find the name of specific Octicons on the [Octicons site](https://primer.style/octicons).

If you're referencing an Octicon that appears in the UI, identify whether the Octicon is the entire label of the UI element (for example, a button that is labeled only with "+") or whether it's only decorative, in addition to another label (for example, a button is labeled "+ Add message").

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ To see instructions for other popular coding environments, use the tool switcher

## Installing {% data variables.product.prodname_copilot %} in Eclipse

1. Download and install the latest version of {% data variables.product.prodname_copilot %} in the [Eclipse Marketplace](https://aka.ms/copiloteclipse).
1. Download and install the latest version of {% data variables.product.prodname_copilot %} from the [Eclipse Marketplace](https://aka.ms/copiloteclipse) or directly via the [Eclipse Update Site](https://azuredownloads-g3ahgwb5b8bkbxhd.b01.azurefd.net/github-copilot/). For more information, see [Installing New Software](https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.user/tasks/tasks-124.htm) in the Eclipse documentation.

1. After the extension is installed, restart Eclipse to apply the changes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ To set up a `www` or custom subdomain, such as `www.example.com` or `blog.exampl
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}
1. Under "Custom domain", type your custom domain, then click **Save**. If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file directly to the root of your source branch. If you are publishing your site with a custom {% data variables.product.prodname_actions %} workflow, no `CNAME` file is created, so you need to create one manually (containing only a line of text with your custom domain). For more information about your publishing source, see [AUTOTITLE](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
1. Under "Custom domain", type your custom domain, then click **Save**. If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file directly to the root of your source branch. If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, no `CNAME` file is created, and any existing `CNAME` file is ignored and is not required. For more information about your publishing source, see [AUTOTITLE](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).

> [!NOTE]
> If your custom domain is an internationalized domain name, you must enter the Punycode encoded version.
Expand Down
4 changes: 4 additions & 0 deletions data/release-notes/enterprise-server/3-13/12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ sections:
When restoring data originally backed up from a 3.13 or greater appliance version, the elasticsearch indices need to be reindexed before some of the data will show up. This happens via a nightly scheduled job. It can also be forced by running `/usr/local/share/enterprise/ghe-es-search-repair`.
- |
When restoring from a backup snapshot, a large number of `mapper_parsing_exception` errors may be displayed.
- |
{% data reusables.release-notes.2025-03-03-elasticsearch-data-loss %}

[Updated: 2025-03-19]
- |
After a restore, existing outside collaborators are unable to be added to repositories in a new organization. This issue can be resolved by running `/usr/local/share/enterprise/ghe-es-search-repair` on the appliance.
- |
Expand Down
4 changes: 4 additions & 0 deletions data/release-notes/enterprise-server/3-14/9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ sections:
When enabling automatic update checks for the first time in the Management Console, the status is not dynamically reflected until the "Updates" page is reloaded.
- |
When restoring from a backup snapshot, a large number of `mapper_parsing_exception` errors may be displayed.
- |
{% data reusables.release-notes.2025-03-03-elasticsearch-data-loss %}

[Updated: 2025-03-19]
- |
After a restore, existing outside collaborators are unable to be added to repositories in a new organization. This issue can be resolved by running `/usr/local/share/enterprise/ghe-es-search-repair` on the appliance.
- |
Expand Down
4 changes: 4 additions & 0 deletions data/release-notes/enterprise-server/3-15/4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ sections:
When initializing a new GHES cluster, nodes with the `consul-server` role should be added to the cluster before adding additional nodes. Adding all nodes simultaneously creates a race condition between nomad server registration and nomad client registration.
- |
Admins setting up cluster high availability (HA) may encounter a spokes error when running ghe-cluster-repl-status if a new organization and repositories are created before using the ghe-cluster-repl-bootstrap command. To avoid this issue, complete the cluster HA setup with ghe-cluster-repl-bootstrap before creating new organizations and repositories.
- |
{% data reusables.release-notes.2025-03-03-elasticsearch-data-loss %}

[Updated: 2025-03-19]
- |
After a restore, existing outside collaborators are unable to be added to repositories in a new organization. This issue can be resolved by running `/usr/local/share/enterprise/ghe-es-search-repair` on the appliance.
8 changes: 3 additions & 5 deletions data/release-notes/enterprise-server/3-16/0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ intro: |
**Warning**: Customers who have security products enabled by default at the organization level will experience issues when upgrading from 3.14 to 3.16.0. We recommend waiting for the next 3.16 patch to upgrade.

{% endwarning %}

For upgrade instructions, see [AUTOTITLE](/admin/upgrading-your-instance/preparing-to-upgrade/overview-of-the-upgrade-process).
sections:

Expand Down Expand Up @@ -230,11 +230,9 @@ sections:
- |
After a geo-replica is promoted to primary by running `ghe-repl-promote`, the actions workflow of a repository does not have any suggested workflows.
- |
For appliances in a high availability configuration, Elasticsearch indices are deleted in two situations:
* On failover
* When running `ghe-repl-teardown <REPLICA_HOSTNAME>` from the primary instance
{% data reusables.release-notes.2025-03-03-elasticsearch-data-loss %}

All indices are recoverable, except for Audit Log indices. Since Elasticsearch itself is the source of truth for these logs, they may only be recoverable from a backup. If you need assistance, visit {% data variables.contact.contact_ent_support %}.
[Updated: 2025-03-19]

closing_down:
# https://github.com/github/releases/issues/4683
Expand Down
2 changes: 1 addition & 1 deletion src/github-apps/lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"2022-11-28"
]
},
"sha": "fcf38b85ce4642ed8f3c12970dc4420c5c97a66a"
"sha": "fd8b14666d8a4e34411bee8dbd103edc8b81d0e3"
}
Loading