Skip to content

Commit 5630122

Browse files
authored
Merge pull request #37991 from github/repo-sync
Repo sync
2 parents ff77c49 + 0bbb013 commit 5630122

File tree

28 files changed

+709
-15
lines changed

28 files changed

+709
-15
lines changed
316 KB
Loading

content/copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ The following table summarizes when an alternative model may be a better choice:
237237

238238
OpenAI o3-mini is a fast, cost-effective reasoning model designed to deliver coding performance while maintaining lower latency and resource usage. o3-mini outperforms o1 on coding benchmarks with response times that are comparable to o1-mini. Copilot is configured to use OpenAI's "medium" reasoning effort.
239239

240-
For more information about o1, see [OpenAI's documentation](https://platform.openai.com/docs/models/o3-mini).
240+
For more information about o3-mini, see [OpenAI's documentation](https://platform.openai.com/docs/models/o3-mini).
241241

242242
### Use cases
243243

content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ children:
1919
- /about-email-notifications-for-pushes-to-your-repository
2020
- /configuring-autolinks-to-reference-external-resources
2121
- /configuring-tag-protection-rules
22+
- /managing-auto-closing-issues
2223
shortTitle: Manage repository settings
2324
---
24-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Managing the automatic closing of issues in your repository
3+
intro: You can select whether merged linked pull requests will auto-close your issues.
4+
versions:
5+
fpt: '*'
6+
ghes: '*'
7+
ghec: '*'
8+
permissions: Repository administrators and maintainers can configure the automating closing of issues in the repository, once related pull requests are merged.
9+
topics:
10+
- Repositories
11+
- Issues
12+
- Pull requests
13+
shortTitle: Manage auto-closing issues
14+
allowTitleToDifferFromFilename: true
15+
---
16+
17+
## About auto-closing issues
18+
19+
By default, merging a linked pull request automatically closes the associated issue. You can override the default behavior by disabling auto-closing.
20+
21+
## Enabling or disabling auto-closing of issues
22+
23+
{% data reusables.repositories.navigate-to-repo %}
24+
{% data reusables.repositories.sidebar-settings %}
25+
1. Under **General**, scroll down to the **Issues** section.
26+
1. Select or deselect **Auto-close issues with merged linked pull requests** to enable or disable auto-closing.

data/ui.yml

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ search:
6464
general_title: There was an error loading search results.
6565
ai_title: There was an error loading Copilot.
6666
description: You can still use this field to search our docs.
67+
cta:
68+
heading: New! Copilot for Docs
69+
description: Ask your question in the search bar and get help in seconds.
6770
old_search:
6871
description: Enter a search term to find it in the GitHub Docs.
6972
placeholder: Search GitHub Docs

src/fixtures/fixtures/data/ui.yml

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ search:
6464
general_title: There was an error loading search results.
6565
ai_title: There was an error loading Copilot.
6666
description: You can still use this field to search our docs.
67+
cta:
68+
heading: New! Copilot for Docs
69+
description: Ask your question in the search bar and get help in seconds.
6770
old_search:
6871
description: Enter a search term to find it in the GitHub Docs.
6972
placeholder: Search GitHub Docs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Context to keep track of a call to action (e.g. popover introducing a new feature)
2+
// The state of the CTA will be stored in local storage, so it will persist across page reloads
3+
// If `dismiss` is called, the CTA will not be shown again
4+
import {
5+
createContext,
6+
useCallback,
7+
useContext,
8+
useEffect,
9+
useState,
10+
PropsWithChildren,
11+
} from 'react'
12+
13+
type CTAPopoverState = {
14+
isOpen: boolean
15+
initializeCTA: () => void // Call to "open" the CTA if it's not already been dismissed by the user
16+
dismiss: () => void // Call to "close" the CTA and store the dismissal in local storage
17+
}
18+
19+
type StoredValue = { dismissed: true }
20+
21+
const CTAPopoverContext = createContext<CTAPopoverState | undefined>(undefined)
22+
23+
const STORAGE_KEY = 'ctaPopoverDismissed'
24+
25+
const isDismissed = (): boolean => {
26+
if (typeof window === 'undefined') return false // SSR guard
27+
try {
28+
const raw = localStorage.getItem(STORAGE_KEY)
29+
if (!raw) return false
30+
const parsed = JSON.parse(raw) as StoredValue
31+
return parsed?.dismissed
32+
} catch {
33+
return false // corruption / quota / disabled storage
34+
}
35+
}
36+
37+
export function CTAPopoverProvider({ children }: PropsWithChildren) {
38+
// We start closed because we might only want to "turn on" the CTA if an experiment is active
39+
const [isOpen, setIsOpen] = useState(false)
40+
41+
const persistDismissal = useCallback(() => {
42+
setIsOpen(false)
43+
try {
44+
const obj: StoredValue = { dismissed: true }
45+
localStorage.setItem(STORAGE_KEY, JSON.stringify(obj))
46+
} catch {
47+
/* ignore */
48+
}
49+
}, [])
50+
51+
const dismiss = useCallback(() => persistDismissal(), [persistDismissal])
52+
const initializeCTA = useCallback(() => {
53+
const dismissed = isDismissed()
54+
if (dismissed) {
55+
setIsOpen(false)
56+
} else {
57+
setIsOpen(true)
58+
}
59+
}, [isDismissed])
60+
61+
// Wrap in a useEffect to avoid a hydration mismatch (SSR guard)
62+
useEffect(() => {
63+
const stored = isDismissed()
64+
setIsOpen(!stored)
65+
}, [])
66+
67+
return (
68+
<CTAPopoverContext.Provider value={{ isOpen, initializeCTA, dismiss }}>
69+
{children}
70+
</CTAPopoverContext.Provider>
71+
)
72+
}
73+
74+
export const useCTAPopoverContext = () => {
75+
const ctx = useContext(CTAPopoverContext)
76+
if (!ctx) throw new Error('useCTAPopoverContext must be used inside <CTAPopoverProvider>')
77+
return ctx
78+
}

src/frame/components/page-header/Header.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { useShouldShowExperiment } from '@/events/components/experiments/useShou
2323
import { useQueryParam } from '@/frame/components/hooks/useQueryParam'
2424
import { useMultiQueryParams } from '@/search/components/hooks/useMultiQueryParams'
2525
import { SearchOverlayContainer } from '@/search/components/input/SearchOverlayContainer'
26+
import { useCTAPopoverContext } from '@/frame/components/context/CTAContext'
2627

2728
import styles from './Header.module.scss'
2829

@@ -50,6 +51,7 @@ export const Header = () => {
5051
const { width } = useInnerWindowWidth()
5152
const returnFocusRef = useRef(null)
5253
const searchButtonRef = useRef<HTMLButtonElement>(null)
54+
const { initializeCTA } = useCTAPopoverContext()
5355

5456
const showNewSearch = useShouldShowExperiment(EXPERIMENTS.ai_search_experiment)
5557
let SearchButton: JSX.Element | null = (
@@ -62,6 +64,8 @@ export const Header = () => {
6264
)
6365
if (!showNewSearch) {
6466
SearchButton = null
67+
} else {
68+
initializeCTA()
6569
}
6670

6771
useEffect(() => {

src/frame/pages/app.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
} from 'src/languages/components/LanguagesContext'
1818
import { useTheme } from 'src/color-schemes/components/useTheme'
1919
import { SharedUIContextProvider } from 'src/frame/components/context/SharedUIContext'
20+
import { CTAPopoverProvider } from 'src/frame/components/context/CTAContext'
2021

2122
type MyAppProps = AppProps & {
2223
isDotComAuthenticated: boolean
@@ -140,7 +141,9 @@ const MyApp = ({ Component, pageProps, languagesContext, stagingName }: MyAppPro
140141
>
141142
<LanguagesContext.Provider value={languagesContext}>
142143
<SharedUIContextProvider>
143-
<Component {...pageProps} />
144+
<CTAPopoverProvider>
145+
<Component {...pageProps} />
146+
</CTAPopoverProvider>
144147
</SharedUIContextProvider>
145148
</LanguagesContext.Provider>
146149
</ThemeProvider>

src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json

+9
Original file line numberDiff line numberDiff line change
@@ -8222,6 +8222,15 @@
82228222
"requestPath": "/users/{username}/settings/billing/shared-storage",
82238223
"additional-permissions": false,
82248224
"access": "read"
8225+
},
8226+
{
8227+
"category": "billing",
8228+
"slug": "get-billing-usage-report-for-a-user",
8229+
"subcategory": "enhanced-billing",
8230+
"verb": "get",
8231+
"requestPath": "/users/{username}/settings/billing/usage",
8232+
"additional-permissions": false,
8233+
"access": "read"
82258234
}
82268235
]
82278236
},

src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json

+6
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,12 @@
10851085
"subcategory": "billing",
10861086
"verb": "get",
10871087
"requestPath": "/users/{username}/settings/billing/shared-storage"
1088+
},
1089+
{
1090+
"slug": "get-billing-usage-report-for-a-user",
1091+
"subcategory": "enhanced-billing",
1092+
"verb": "get",
1093+
"requestPath": "/users/{username}/settings/billing/usage"
10881094
}
10891095
],
10901096
"branches": [

src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json

+11
Original file line numberDiff line numberDiff line change
@@ -9981,6 +9981,17 @@
99819981
"user-to-server": true,
99829982
"server-to-server": false,
99839983
"additional-permissions": false
9984+
},
9985+
{
9986+
"category": "billing",
9987+
"slug": "get-billing-usage-report-for-a-user",
9988+
"subcategory": "enhanced-billing",
9989+
"verb": "get",
9990+
"requestPath": "/users/{username}/settings/billing/usage",
9991+
"access": "read",
9992+
"user-to-server": true,
9993+
"server-to-server": false,
9994+
"additional-permissions": false
99849995
}
99859996
]
99869997
},

src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json

+6
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,12 @@
10851085
"subcategory": "billing",
10861086
"verb": "get",
10871087
"requestPath": "/users/{username}/settings/billing/shared-storage"
1088+
},
1089+
{
1090+
"slug": "get-billing-usage-report-for-a-user",
1091+
"subcategory": "enhanced-billing",
1092+
"verb": "get",
1093+
"requestPath": "/users/{username}/settings/billing/usage"
10881094
}
10891095
],
10901096
"branches": [

src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json

+9
Original file line numberDiff line numberDiff line change
@@ -8921,6 +8921,15 @@
89218921
"requestPath": "/users/{username}/settings/billing/shared-storage",
89228922
"additional-permissions": false,
89238923
"access": "read"
8924+
},
8925+
{
8926+
"category": "billing",
8927+
"slug": "get-billing-usage-report-for-a-user",
8928+
"subcategory": "enhanced-billing",
8929+
"verb": "get",
8930+
"requestPath": "/users/{username}/settings/billing/usage",
8931+
"additional-permissions": false,
8932+
"access": "read"
89248933
}
89258934
]
89268935
},

src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json

+6
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,12 @@
11231123
"subcategory": "billing",
11241124
"verb": "get",
11251125
"requestPath": "/users/{username}/settings/billing/shared-storage"
1126+
},
1127+
{
1128+
"slug": "get-billing-usage-report-for-a-user",
1129+
"subcategory": "enhanced-billing",
1130+
"verb": "get",
1131+
"requestPath": "/users/{username}/settings/billing/usage"
11261132
}
11271133
],
11281134
"branches": [

src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json

+11
Original file line numberDiff line numberDiff line change
@@ -10830,6 +10830,17 @@
1083010830
"user-to-server": true,
1083110831
"server-to-server": false,
1083210832
"additional-permissions": false
10833+
},
10834+
{
10835+
"category": "billing",
10836+
"slug": "get-billing-usage-report-for-a-user",
10837+
"subcategory": "enhanced-billing",
10838+
"verb": "get",
10839+
"requestPath": "/users/{username}/settings/billing/usage",
10840+
"access": "read",
10841+
"user-to-server": true,
10842+
"server-to-server": false,
10843+
"additional-permissions": false
1083310844
}
1083410845
]
1083510846
},

src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json

+6
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,12 @@
11231123
"subcategory": "billing",
11241124
"verb": "get",
11251125
"requestPath": "/users/{username}/settings/billing/shared-storage"
1126+
},
1127+
{
1128+
"slug": "get-billing-usage-report-for-a-user",
1129+
"subcategory": "enhanced-billing",
1130+
"verb": "get",
1131+
"requestPath": "/users/{username}/settings/billing/usage"
11261132
}
11271133
],
11281134
"branches": [

src/github-apps/lib/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@
6060
"2022-11-28"
6161
]
6262
},
63-
"sha": "1c22f3361af92533fad97262cf4b7c18574f22a6"
63+
"sha": "467f6a98a97a73630a1f1e75ddee01cb59f33dd5"
6464
}

0 commit comments

Comments
 (0)