Skip to content

Commit

Permalink
Merge pull request github#35551 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Dec 4, 2024
2 parents 71d7410 + 6894f93 commit 0279b64
Show file tree
Hide file tree
Showing 12 changed files with 306 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ shortTitle: About merge methods

> [!NOTE]
> When using the merge queue, you no longer get to choose the merge method, as this is controlled by the queue. {% data reusables.pull_requests.merge-queue-references %}
{% ifversion repo-rules-merge-type -%}
>
> Merge methods set on the repository that conflict with the merge method rule will prevent merging. For example if you do not allow rebase merging for the repository, and the merge rule only allows rebase on a branch, that merge will not be possible. For more information, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-a-pull-request-before-merging)."
{%- endif %}

{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ For complex pull requests that require many reviews, requiring an approval from

Optionally, you can require all comments on the pull request to be resolved before it can be merged to a branch. This ensures that all comments are addressed or acknowledged before merge.

{% ifversion repo-rules-merge-type %}
> [!NOTE]
> Allowed merge method is currently in public preview, the rule is currently non-bypassable, and subject to change.
Optionally, you can require a merge type of merge, squash or rebase. This means the targeted branches may only be merged based on the allowed type. Additionally if the repository has disabled a merge method and the ruleset required a different method, the merge will be blocked. For more information, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github)."
{% endif %}

## Require status checks to pass before merging

Required status checks ensure that all required CI tests are passing before collaborators can make changes to a branch or tag targeted by your ruleset. Required status checks can be checks or statuses. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,13 @@ Code navigation helps you to read, navigate, and understand code by showing and

![Screenshot showing a code file with a function called "request" highlighted and a pop-up window with information about the function underneath. The pop-up has two tabs: "Definition" and "Reference".](/assets/images/help/repository/code-navigation-popover.png)

Code navigation uses the open source [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) library. The following languages and navigation strategies are supported.

{% rowheaders %}

| Language | Search-based code navigation | Precise code navigation |
|------------------|:--------------------------------------------:|:--------------------------------------------:|
| Bash | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| C | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| C# | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| C++ | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| CodeQL | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Elixir | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Go | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| JSX | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Java | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| JavaScript | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Lua | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| PHP | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Protocol Buffers | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Python | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |
| R | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Ruby | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Rust | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Scala | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Starlark | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| Swift | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| TypeScript | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |

{% endrowheaders %}

You do not need to configure anything in your repository to enable code navigation. We will automatically extract search-based and precise code navigation information for these supported languages in all repositories and you can switch between the two supported code navigation approaches if your programming language is supported by both.

{% data variables.product.prodname_dotcom %} has developed two code navigation approaches based on the open source [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) and [`stack-graphs`](https://github.com/github/stack-graphs) library:
* Search-based - searches all definitions and references across a repository to find entities with a given name
* Precise - resolves definitions and references based on the set of classes, functions, and imported definitions at a given point in your code

To learn more about these approaches, see "[Precise and search-based navigation](#precise-and-search-based-navigation)."

Future releases will add _precise code navigation_ for more languages, which is a code navigation approach that can give more accurate results.
Code navigation uses the open source [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) library. The following languages support code navigation.

{% data reusables.search.code-nav-supported-languages %}

You do not need to configure anything in your repository to enable code navigation. We will automatically extract code navigation information for these supported languages in all repositories.

{% data variables.product.prodname_dotcom %} has developed a code navigation approach based on the open source [`tree-sitter`](https://github.com/tree-sitter/tree-sitter) library that searches all definitions and references across a repository to find entities with a given name.

{% ifversion code-view-ui %}You can use keyboard shortcuts to navigate within a code file. For more information, see "[AUTOTITLE](/get-started/accessibility/keyboard-shortcuts#navigating-within-code-files)."{% endif %}

Expand Down Expand Up @@ -95,22 +63,6 @@ You can find all references for a function or method within the same repository

![Screenshot of the function window. A section, titled "3 References," is outlined in dark orange.](/assets/images/help/repository/find-all-references-tab.png)

## Precise and search-based navigation

Certain languages supported by {% data variables.product.prodname_dotcom %} have access to _precise code navigation_, which uses an algorithm (based on the open source [`stack-graphs`](https://github.com/github/stack-graphs) library) that resolves definitions and references based on the set of classes, functions, and imported definitions that are visible at any given point in your code. Other languages use _search-based code navigation_, which searches all definitions and references across a repository to find entities with a given name. Both strategies are effective at finding results and both make sure to avoid inappropriate results such as comments, but precise code navigation can give more accurate results, especially when a repository contains multiple methods or functions with the same name.

If you don't see the results you expect from a precise code navigation query, you can click on the "search-based" link in the displayed popover to perform search-based navigation.

![Screenshot of the function window. Two links, labeled, "Search for this symbol in this repository" and "all repositories," are outlined in dark orange.](/assets/images/help/repository/search-based-code-navigation-link.png)

If your precise results appear inaccurate, you can file a support request.

## Cross-repository precise code navigation

Cross-repo code navigation is available for languages that are supported by precise code navigation and the dependency graph. For more information, see "[AUTOTITLE](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)." With cross-repo code navigation, you can jump to the definition of functions or variables defined in dependencies imported by your project if that dependency is a repository hosted by {% data variables.product.prodname_dotcom %}. Cross-repo code navigation does not support find-all-references requests at this time.

![Screenshot of a code file on {% data variables.product.prodname_dotcom %}. On the line "import o.s.", the module name "o.s." is highlighted, and a "Definitions" modal shows a result tagged with "cross-repo result".](/assets/images/help/repository/cross-repository-code-navigation.png)

## Troubleshooting code navigation

If code navigation is enabled for you but you don't see links to the definitions of functions and methods:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Code search is integrated with features in the search interface on {% data varia

{% data variables.product.prodname_dotcom %} code search provides code navigation for supported languages. This includes jumping to the definition of and finding references for programming language constructs like classes, structs, functions, and methods. See "[AUTOTITLE](/repositories/working-with-files/using-files/navigating-code-on-github)."

Supported languages for code navigation include:

{% data reusables.search.code-nav-supported-languages %}

## Limitations

We have indexed many public repositories for code search, and continue to index more. Additionally, the private repositories of {% data variables.product.prodname_dotcom %} users are indexed and searchable by those that already have access to those private repositories on {% data variables.product.prodname_dotcom %}. However, very large repositories may not be indexed at this time, and not all code is indexed.
Expand Down
7 changes: 7 additions & 0 deletions data/features/repo-rules-merge-type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Reference: #53268
# Public preview for merge method rules

versions:
fpt: '*'
ghec: '*'
ghes: '>=3.18'
2 changes: 1 addition & 1 deletion data/reusables/supported-languages/python.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| Python {% ifversion fpt or ghec %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} <br>precise| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% endif %}
| Python {% ifversion fpt or ghec %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %}<br>pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% endif %}
2 changes: 1 addition & 1 deletion src/audit-logs/lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"apiOnlyEvents": "This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.",
"apiRequestEvent": "This event is only available via audit log streaming."
},
"sha": "f6212cb1a2ca919f7353ca6b1f0095b1e4197744"
"sha": "87148ab1f10c5c1736a85a6cd6aafd001d15c3d6"
}
15 changes: 15 additions & 0 deletions src/graphql/data/fpt/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
[
{
"schemaChanges": [
{
"title": "The GraphQL schema includes these changes:",
"changes": [
"<p>Type 'UpdateProjectV2FieldInput' was added</p>",
"<p>Type 'UpdateProjectV2FieldPayload' was added</p>",
"<p>Field 'updateProjectV2Field<code>was added to object type</code>Mutation'</p>"
]
}
],
"previewChanges": [],
"upcomingChanges": [],
"date": "2024-12-04"
},
{
"schemaChanges": [
{
Expand Down
56 changes: 56 additions & 0 deletions src/graphql/data/fpt/schema.docs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -25338,6 +25338,16 @@ type Mutation {
input: UpdateProjectV2DraftIssueInput!
): UpdateProjectV2DraftIssuePayload

"""
Update a project field.
"""
updateProjectV2Field(
"""
Parameters for UpdateProjectV2Field
"""
input: UpdateProjectV2FieldInput!
): UpdateProjectV2FieldPayload

"""
This mutation updates the value of a field for an item in a Project. Currently
only single-select, text, number, date, and iteration fields are supported.
Expand Down Expand Up @@ -60412,6 +60422,52 @@ type UpdateProjectV2DraftIssuePayload {
draftIssue: DraftIssue
}

"""
Autogenerated input type of UpdateProjectV2Field
"""
input UpdateProjectV2FieldInput {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The ID of the field to update.
"""
fieldId: ID!
@possibleTypes(
concreteTypes: ["ProjectV2Field", "ProjectV2IterationField", "ProjectV2SingleSelectField"]
abstractType: "ProjectV2FieldConfiguration"
)

"""
The name to update.
"""
name: String

"""
Options for a field of type SINGLE_SELECT. If empty, no changes will be made
to the options. If values are present, they will overwrite the existing
options for the field.
"""
singleSelectOptions: [ProjectV2SingleSelectFieldOptionInput!]
}

"""
Autogenerated return type of UpdateProjectV2Field.
"""
type UpdateProjectV2FieldPayload {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The updated field.
"""
projectV2Field: ProjectV2FieldConfiguration
}

"""
Autogenerated input type of UpdateProjectV2
"""
Expand Down
76 changes: 76 additions & 0 deletions src/graphql/data/fpt/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9057,6 +9057,40 @@
}
]
},
{
"name": "updateProjectV2Field",
"kind": "mutations",
"id": "updateprojectv2field",
"href": "/graphql/reference/mutations#updateprojectv2field",
"description": "<p>Update a project field.</p>",
"inputFields": [
{
"name": "input",
"type": "UpdateProjectV2FieldInput!",
"id": "updateprojectv2fieldinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#updateprojectv2fieldinput"
}
],
"returnFields": [
{
"name": "clientMutationId",
"type": "String",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string",
"description": "<p>A unique identifier for the client performing the mutation.</p>"
},
{
"name": "projectV2Field",
"type": "ProjectV2FieldConfiguration",
"id": "projectv2fieldconfiguration",
"kind": "unions",
"href": "/graphql/reference/unions#projectv2fieldconfiguration",
"description": "<p>The updated field.</p>"
}
]
},
{
"name": "updateProjectV2ItemFieldValue",
"kind": "mutations",
Expand Down Expand Up @@ -105120,6 +105154,48 @@
}
]
},
{
"name": "UpdateProjectV2FieldInput",
"kind": "inputObjects",
"id": "updateprojectv2fieldinput",
"href": "/graphql/reference/input-objects#updateprojectv2fieldinput",
"description": "<p>Autogenerated input type of UpdateProjectV2Field.</p>",
"inputFields": [
{
"name": "clientMutationId",
"description": "<p>A unique identifier for the client performing the mutation.</p>",
"type": "String",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
},
{
"name": "fieldId",
"description": "<p>The ID of the field to update.</p>",
"type": "ID!",
"id": "id",
"kind": "scalars",
"href": "/graphql/reference/scalars#id",
"isDeprecated": false
},
{
"name": "name",
"description": "<p>The name to update.</p>",
"type": "String",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
},
{
"name": "singleSelectOptions",
"description": "<p>Options for a field of type SINGLE_SELECT. If empty, no changes will be made\nto the options. If values are present, they will overwrite the existing\noptions for the field.</p>",
"type": "[ProjectV2SingleSelectFieldOptionInput!]",
"id": "projectv2singleselectfieldoptioninput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#projectv2singleselectfieldoptioninput"
}
]
},
{
"name": "UpdateProjectV2Input",
"kind": "inputObjects",
Expand Down
56 changes: 56 additions & 0 deletions src/graphql/data/ghec/schema.docs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -25338,6 +25338,16 @@ type Mutation {
input: UpdateProjectV2DraftIssueInput!
): UpdateProjectV2DraftIssuePayload

"""
Update a project field.
"""
updateProjectV2Field(
"""
Parameters for UpdateProjectV2Field
"""
input: UpdateProjectV2FieldInput!
): UpdateProjectV2FieldPayload

"""
This mutation updates the value of a field for an item in a Project. Currently
only single-select, text, number, date, and iteration fields are supported.
Expand Down Expand Up @@ -60412,6 +60422,52 @@ type UpdateProjectV2DraftIssuePayload {
draftIssue: DraftIssue
}

"""
Autogenerated input type of UpdateProjectV2Field
"""
input UpdateProjectV2FieldInput {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The ID of the field to update.
"""
fieldId: ID!
@possibleTypes(
concreteTypes: ["ProjectV2Field", "ProjectV2IterationField", "ProjectV2SingleSelectField"]
abstractType: "ProjectV2FieldConfiguration"
)

"""
The name to update.
"""
name: String

"""
Options for a field of type SINGLE_SELECT. If empty, no changes will be made
to the options. If values are present, they will overwrite the existing
options for the field.
"""
singleSelectOptions: [ProjectV2SingleSelectFieldOptionInput!]
}

"""
Autogenerated return type of UpdateProjectV2Field.
"""
type UpdateProjectV2FieldPayload {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The updated field.
"""
projectV2Field: ProjectV2FieldConfiguration
}

"""
Autogenerated input type of UpdateProjectV2
"""
Expand Down
Loading

0 comments on commit 0279b64

Please sign in to comment.