diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md b/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md index 9d596d630a61..5833fbb4ac06 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github.md @@ -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 %} diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md index 9c45b9936f02..0c152b00080c 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md @@ -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)." diff --git a/content/repositories/working-with-files/using-files/navigating-code-on-github.md b/content/repositories/working-with-files/using-files/navigating-code-on-github.md index a437e159a56a..9bbaa4177b7a 100644 --- a/content/repositories/working-with-files/using-files/navigating-code-on-github.md +++ b/content/repositories/working-with-files/using-files/navigating-code-on-github.md @@ -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 %} @@ -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: diff --git a/content/search-github/github-code-search/about-github-code-search.md b/content/search-github/github-code-search/about-github-code-search.md index 944728f789be..67893265987c 100644 --- a/content/search-github/github-code-search/about-github-code-search.md +++ b/content/search-github/github-code-search/about-github-code-search.md @@ -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. diff --git a/data/features/repo-rules-merge-type.yml b/data/features/repo-rules-merge-type.yml new file mode 100644 index 000000000000..8a96053173bb --- /dev/null +++ b/data/features/repo-rules-merge-type.yml @@ -0,0 +1,7 @@ +# Reference: #53268 +# Public preview for merge method rules + +versions: + fpt: '*' + ghec: '*' + ghes: '>=3.18' diff --git a/data/reusables/supported-languages/python.md b/data/reusables/supported-languages/python.md index 1c4e6b5eb0ae..4b798684288f 100644 --- a/data/reusables/supported-languages/python.md +++ b/data/reusables/supported-languages/python.md @@ -1 +1 @@ -| Python {% ifversion fpt or ghec %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}
precise| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %}
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" %}
pip | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% elsif ghes %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %}
pip | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Unsupported" %} |{% endif %} diff --git a/src/audit-logs/lib/config.json b/src/audit-logs/lib/config.json index e51b311c411f..2ba6d1a2a245 100644 --- a/src/audit-logs/lib/config.json +++ b/src/audit-logs/lib/config.json @@ -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" } \ No newline at end of file diff --git a/src/graphql/data/fpt/changelog.json b/src/graphql/data/fpt/changelog.json index d6f6fdda2950..6441d1ed004d 100644 --- a/src/graphql/data/fpt/changelog.json +++ b/src/graphql/data/fpt/changelog.json @@ -1,4 +1,19 @@ [ + { + "schemaChanges": [ + { + "title": "The GraphQL schema includes these changes:", + "changes": [ + "

Type 'UpdateProjectV2FieldInput' was added

", + "

Type 'UpdateProjectV2FieldPayload' was added

", + "

Field 'updateProjectV2Fieldwas added to object typeMutation'

" + ] + } + ], + "previewChanges": [], + "upcomingChanges": [], + "date": "2024-12-04" + }, { "schemaChanges": [ { diff --git a/src/graphql/data/fpt/schema.docs.graphql b/src/graphql/data/fpt/schema.docs.graphql index cac39bf16b5b..e731bdd599ce 100644 --- a/src/graphql/data/fpt/schema.docs.graphql +++ b/src/graphql/data/fpt/schema.docs.graphql @@ -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. @@ -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 """ diff --git a/src/graphql/data/fpt/schema.json b/src/graphql/data/fpt/schema.json index 72196dd5c4aa..7fa147a833cf 100644 --- a/src/graphql/data/fpt/schema.json +++ b/src/graphql/data/fpt/schema.json @@ -9057,6 +9057,40 @@ } ] }, + { + "name": "updateProjectV2Field", + "kind": "mutations", + "id": "updateprojectv2field", + "href": "/graphql/reference/mutations#updateprojectv2field", + "description": "

Update a project field.

", + "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": "

A unique identifier for the client performing the mutation.

" + }, + { + "name": "projectV2Field", + "type": "ProjectV2FieldConfiguration", + "id": "projectv2fieldconfiguration", + "kind": "unions", + "href": "/graphql/reference/unions#projectv2fieldconfiguration", + "description": "

The updated field.

" + } + ] + }, { "name": "updateProjectV2ItemFieldValue", "kind": "mutations", @@ -105120,6 +105154,48 @@ } ] }, + { + "name": "UpdateProjectV2FieldInput", + "kind": "inputObjects", + "id": "updateprojectv2fieldinput", + "href": "/graphql/reference/input-objects#updateprojectv2fieldinput", + "description": "

Autogenerated input type of UpdateProjectV2Field.

", + "inputFields": [ + { + "name": "clientMutationId", + "description": "

A unique identifier for the client performing the mutation.

", + "type": "String", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, + { + "name": "fieldId", + "description": "

The ID of the field to update.

", + "type": "ID!", + "id": "id", + "kind": "scalars", + "href": "/graphql/reference/scalars#id", + "isDeprecated": false + }, + { + "name": "name", + "description": "

The name to update.

", + "type": "String", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, + { + "name": "singleSelectOptions", + "description": "

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.

", + "type": "[ProjectV2SingleSelectFieldOptionInput!]", + "id": "projectv2singleselectfieldoptioninput", + "kind": "input-objects", + "href": "/graphql/reference/input-objects#projectv2singleselectfieldoptioninput" + } + ] + }, { "name": "UpdateProjectV2Input", "kind": "inputObjects", diff --git a/src/graphql/data/ghec/schema.docs.graphql b/src/graphql/data/ghec/schema.docs.graphql index cac39bf16b5b..e731bdd599ce 100644 --- a/src/graphql/data/ghec/schema.docs.graphql +++ b/src/graphql/data/ghec/schema.docs.graphql @@ -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. @@ -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 """ diff --git a/src/graphql/data/ghec/schema.json b/src/graphql/data/ghec/schema.json index 72196dd5c4aa..7fa147a833cf 100644 --- a/src/graphql/data/ghec/schema.json +++ b/src/graphql/data/ghec/schema.json @@ -9057,6 +9057,40 @@ } ] }, + { + "name": "updateProjectV2Field", + "kind": "mutations", + "id": "updateprojectv2field", + "href": "/graphql/reference/mutations#updateprojectv2field", + "description": "

Update a project field.

", + "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": "

A unique identifier for the client performing the mutation.

" + }, + { + "name": "projectV2Field", + "type": "ProjectV2FieldConfiguration", + "id": "projectv2fieldconfiguration", + "kind": "unions", + "href": "/graphql/reference/unions#projectv2fieldconfiguration", + "description": "

The updated field.

" + } + ] + }, { "name": "updateProjectV2ItemFieldValue", "kind": "mutations", @@ -105120,6 +105154,48 @@ } ] }, + { + "name": "UpdateProjectV2FieldInput", + "kind": "inputObjects", + "id": "updateprojectv2fieldinput", + "href": "/graphql/reference/input-objects#updateprojectv2fieldinput", + "description": "

Autogenerated input type of UpdateProjectV2Field.

", + "inputFields": [ + { + "name": "clientMutationId", + "description": "

A unique identifier for the client performing the mutation.

", + "type": "String", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, + { + "name": "fieldId", + "description": "

The ID of the field to update.

", + "type": "ID!", + "id": "id", + "kind": "scalars", + "href": "/graphql/reference/scalars#id", + "isDeprecated": false + }, + { + "name": "name", + "description": "

The name to update.

", + "type": "String", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, + { + "name": "singleSelectOptions", + "description": "

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.

", + "type": "[ProjectV2SingleSelectFieldOptionInput!]", + "id": "projectv2singleselectfieldoptioninput", + "kind": "input-objects", + "href": "/graphql/reference/input-objects#projectv2singleselectfieldoptioninput" + } + ] + }, { "name": "UpdateProjectV2Input", "kind": "inputObjects",