Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,17 @@ on:

Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group. For more information see [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request-with-a-merge-queue).

For example, you can run a workflow when the `checks_requested` activity has occurred.
You can use the `branches` or `branches-ignore` filter to configure your workflow to run only for merge groups that target specific branches. For more information, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onmerge_groupbranchesbranches-ignore).

For example, the following workflow runs when the `checks_requested` activity occurs for a merge group that targets `main`.

```yaml
on:
pull_request:
branches: [ "main" ]
branches: [main]
merge_group:
types: [checks_requested]
branches: [main]
```

## `milestone`
Expand Down
62 changes: 62 additions & 0 deletions content/actions/reference/workflows-and-actions/workflow-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,68 @@ run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}

{% data reusables.actions.workflows.triggering-workflow-branches4 %}

## `on.merge_group.<branches|branches-ignore>`

When using the `merge_group` event, you can configure a workflow to run only for merge groups that target specific branches.

Use the `branches` filter when you want to include branch name patterns or when you want to both include and exclude branch name patterns. Use `branches-ignore` when you only want to exclude branch name patterns. You cannot use both `branches` and `branches-ignore` for the same event in a workflow.

The `branches` and `branches-ignore` filters accept glob patterns that use characters like `*`, `**`, `+`, `?`, `!` and others to match more than one branch name. If a name contains any of these characters and you want a literal match, you need to escape each of these special characters with `\`. For more information about glob patterns, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet).

### Example: Including branches

The patterns defined in `branches` are evaluated against the target branch's name. For example, the following workflow will run whenever there is a `merge_group` event for a merge group that targets:

* A branch named `main`
* A branch whose name starts with `releases/`

```yaml
on:
merge_group:
types: [checks_requested]
branches:
- main
- 'releases/**'
```

### Example: Excluding branches

When a pattern matches the `branches-ignore` pattern, the workflow will not run. The patterns defined in `branches-ignore` are evaluated against the target branch's name. For example, the following workflow will run whenever there is a `merge_group` event unless the merge group targets:

* A branch named `canary`
* A branch whose name matches `releases/**-alpha`, like `releases/beta/3-alpha` <!-- markdownlint-disable-line outdated-release-phase-terminology -->

```yaml
on:
merge_group:
types: [checks_requested]
branches-ignore:
- canary
- 'releases/**-alpha'
```

### Example: Including and excluding branches

You cannot use `branches` and `branches-ignore` to filter the same event in a single workflow. If you want to both include and exclude branch patterns for a single event, use the `branches` filter along with the `!` character to indicate which branches should be excluded.

If you define a branch with the `!` character, you must also define at least one branch without the `!` character. If you only want to exclude branches, use `branches-ignore` instead.

The order that you define patterns matters.

* A matching negative pattern (prefixed with `!`) after a positive match will exclude the branch.
* A matching positive pattern after a negative match will include the branch again.

The following workflow will run on `merge_group` events for merge groups that target `releases/10` or `releases/beta/mona`, but not for merge groups that target `releases/10-alpha` or `releases/beta/3-alpha` because the negative pattern `!releases/**-alpha` follows the positive pattern. <!-- markdownlint-disable-line outdated-release-phase-terminology -->

```yaml
on:
merge_group:
types: [checks_requested]
branches:
- 'releases/**'
- '!releases/**-alpha'
```

## `on.push.<branches|tags|branches-ignore|tags-ignore>`

{% data reusables.actions.workflows.run-on-specific-branches-or-tags1 %}
Expand Down
17 changes: 17 additions & 0 deletions content/copilot/concepts/prompting/prompt-engineering.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ redirect_from:
- /copilot/using-github-copilot/copilot-chat/prompt-engineering-for-copilot-chat
- /copilot/concepts/prompt-engineering-for-copilot-chat
- /copilot/concepts/prompt-engineering
- /copilot/tutorials/copilot-cookbook/document-code
- /copilot/example-prompts-for-github-copilot-chat/documenting-code
- /copilot/copilot-chat-cookbook/documenting-code
- /copilot/tutorials/copilot-chat-cookbook/documenting-code
- /copilot/tutorials/copilot-chat-cookbook/document-code
- /copilot/tutorials/copilot-cookbook/document-code/document-legacy-code
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code
- /copilot/copilot-chat-cookbook/documenting-code/documenting-legacy-code
- /copilot/tutorials/copilot-chat-cookbook/documenting-code/documenting-legacy-code
- /copilot/tutorials/copilot-chat-cookbook/documenting-code/document-legacy-code
- /copilot/tutorials/copilot-chat-cookbook/document-code/document-legacy-code
- /copilot/tutorials/copilot-cookbook/document-code/sync-documentation
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes
- /copilot/copilot-chat-cookbook/documenting-code/syncing-documentation-with-code-changes
- /copilot/tutorials/copilot-chat-cookbook/documenting-code/syncing-documentation-with-code-changes
- /copilot/tutorials/copilot-chat-cookbook/documenting-code/sync-documentation
- /copilot/tutorials/copilot-chat-cookbook/document-code/sync-documentation
contentType: concepts
category:
- Configure Copilot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ redirect_from:
- /copilot/how-tos/chat/get-started-with-chat
- /copilot/how-tos/use-chat/get-started-with-chat
- /copilot/how-tos/chat-with-copilot/get-started-with-chat
- /copilot/tutorials/copilot-cookbook/refactor-code/fix-lint-errors
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors
- /copilot/copilot-chat-cookbook/refactoring-code/fixing-lint-errors
- /copilot/tutorials/copilot-chat-cookbook/refactoring-code/fixing-lint-errors
- /copilot/tutorials/copilot-chat-cookbook/refactoring-code/fix-lint-errors
- /copilot/tutorials/copilot-chat-cookbook/refactor-code/fix-lint-errors
shortTitle: Get started with Chat in your IDE
contentType: how-tos
category:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ redirect_from:
- /copilot/how-tos/github-flow/use-copilot-to-create-issues
- /copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues
- /copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-or-update-issues
- /copilot/tutorials/plan-a-project
- /copilot/tutorials/copilot-cookbook/document-code/filing-issues-without-breaking-your-flow
- /copilot/tutorials/copilot-chat-cookbook/document-code/creating-issues
- /copilot/tutorials/copilot-chat-cookbook/document-code/filing-issues-without-breaking-your-flow
contentType: how-tos
category:
- Author and optimize with Copilot
Expand Down Expand Up @@ -91,4 +95,3 @@ With {% data variables.copilot.copilot_cloud_agent %} enabled, you can assign an
## Further reading

* [AUTOTITLE](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
* [AUTOTITLE](/copilot/tutorials/plan-a-project)
5 changes: 4 additions & 1 deletion content/copilot/reference/ai-models/model-comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ category:
redirect_from:
- /copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task
- /copilot/reference/ai-models/choosing-the-right-ai-model-for-your-task
- /copilot/tutorials/compare-ai-models
- /copilot/using-github-copilot/ai-models/examples-for-ai-model-comparison
- /copilot/using-github-copilot/ai-models/comparing-ai-models-using-different-tasks
- /copilot/tutorials/comparing-ai-models-using-different-tasks
contentType: reference
---

Expand Down Expand Up @@ -149,6 +153,5 @@ Some models have behaviors, limitations, or safeguards that are useful to unders
Choosing the right model helps you get the most out of {% data variables.product.prodname_copilot_short %}. If you're not sure which model to use, start with a general-purpose option like {% data variables.copilot.copilot_gpt_5_mini %}, then adjust based on your needs.

* For detailed model specs and pricing, see [AUTOTITLE](/copilot/reference/ai-models/supported-models).
* For more examples of how to use different models, see [AUTOTITLE](/copilot/tutorials/compare-ai-models).
* To switch between models, refer to [AUTOTITLE](/copilot/how-tos/use-ai-models/change-the-chat-model) or [AUTOTITLE](/copilot/how-tos/use-ai-models/change-the-completion-model).
* To learn how {% data variables.copilot.copilot_chat_short %} serves different AI models, see [AUTOTITLE](/copilot/reference/ai-models/model-hosting).
196 changes: 0 additions & 196 deletions content/copilot/tutorials/compare-ai-models.md

This file was deleted.

Loading
Loading