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
5 changes: 1 addition & 4 deletions .github/workflows/orphaned-features-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ jobs:
exit 0
fi

# Why only 5?
# Because, we're not in a hurry and anything larger than that would
# make the PR too intimidatingly big to review.
npm run find-orphaned-features -- delete --max 5 --verbose /tmp/orphaned-features.json
npm run find-orphaned-features -- delete --verbose /tmp/orphaned-features.json

git status

Expand Down
Binary file added assets/images/social-cards/actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/copilot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/issues.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions data/reusables/copilot/differences-cfi-cfb-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| | {% data variables.product.prodname_copilot_free_short %} | {% data variables.product.prodname_copilot_pro_short %} | {% data variables.product.prodname_copilot_pro_plus_short %} | {% data variables.product.prodname_copilot_business_short %} | {% data variables.product.prodname_copilot_enterprise_short %} |
| --- | --- | --- | --- | --- | --- |
| Pricing | Not applicable | {% data variables.copilot.cfi_price_per_month %} per month, or<br>{% data variables.copilot.cfi_price_per_year %} per year<br>(free for some users) | {% data variables.copilot.cpp_price_per_month %} per month, or<br>{% data variables.copilot.cpp_price_per_year %} per year<br> | {% data variables.copilot.cfb_price_per_month %} per granted seat per month | {% data variables.copilot.ce_price_per_month %} per granted seat per month |
| Premium requests | 50 per month | 300 per month | 1500 per month | 300 per month | 1000 per month |
| Premium requests | 50 per month | 300 per month | 1500 per month | 300 per user per month | 1000 per user per month |
| Purchase additional premium requests at $0.04/request| {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |

{% endrowheaders %}
Expand Down Expand Up @@ -89,8 +89,8 @@
| --- | --- | --- | --- | --- | --- |
| {% data variables.product.prodname_copilot_for_prs %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| Audit logs | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} |{% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_short %} knowledge bases |{% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| Fine tuning a custom large language model (limited {% data variables.release-phases.public_preview %})[^6] | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_short %} knowledge bases |{% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} |
| Fine tuning a custom large language model (limited {% data variables.release-phases.public_preview %})[^6] | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.product.prodname_copilot_cli_short %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |

{% endrowheaders %}
Expand Down
4 changes: 2 additions & 2 deletions data/reusables/copilot/premium-requests-for-enterprises.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Each {% data variables.product.prodname_copilot_short %} plan includes a per-user allowance for premium requests:

* 300 requests per month for {% data variables.product.prodname_copilot_business_short %}
* 1000 requests per month for {% data variables.product.prodname_copilot_enterprise_short %}
* 300 requests per user per month for {% data variables.product.prodname_copilot_business_short %}
* 1000 requests per user per month for {% data variables.product.prodname_copilot_enterprise_short %}

{% data variables.product.prodname_copilot_chat_short %}, {% data variables.product.prodname_copilot_agent_short %} mode, {% data variables.product.prodname_copilot_short %} code review, and {% data variables.product.prodname_copilot_extensions_short %} use premium requests, with usage varying by model.
19 changes: 15 additions & 4 deletions src/frame/components/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ export const DefaultLayout = (props: Props) => {

const metaDescription = page.introPlainText ? page.introPlainText : t('default_description')

const SOCIAL_CATEGORIES = new Set(['security', 'actions', 'issues', 'copilot'])
const SOCIAL_CARD_IMG_BASE_URL = '/assets/cb-345/images/social-cards'

function getCategoryImageUrl(category: string): string {
return `${SOCIAL_CARD_IMG_BASE_URL}/${category}.png`
}

function getSocialCardImage(): string {
if (currentProduct && SOCIAL_CATEGORIES.has(currentProduct.id)) {
return getCategoryImageUrl(currentProduct.id)
}
return getCategoryImageUrl('default')
}

return (
<DomainNameEditProvider>
<Head>
Expand Down Expand Up @@ -111,10 +125,7 @@ export const DefaultLayout = (props: Props) => {
<meta property="og:title" content={page.fullTitle} />
<meta property="og:type" content="article" />
<meta property="og:url" content={fullUrl} />
<meta
property="og:image"
content="https://github.githubassets.com/images/modules/open_graph/github-logo.png"
/>
<meta property="og:image" content={getSocialCardImage()} />
</>
)}
</Head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ export const UnrenderedMarkdownContent = ({
{...props}
href={href}
target={openLinksInNewTab ? '_blank' : undefined}
rel={openLinksInNewTab ? 'noopener noreferrer' : undefined}
onClick={(e) => {
// For some reason we need to override the default onClick to get these links to open in a new tab
if (openLinksInNewTab) {
e.stopPropagation()
e.preventDefault()
window.open(href, '_blank')
}
}}
data-group-key={eventGroupKey}
data-group-id={eventGroupId}
>
Expand Down
22 changes: 12 additions & 10 deletions src/shielding/middleware/rate-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (isNaN(MAX)) {
}

// We apply this rate limiter to _all_ routes in src/shielding/index.ts except for `/api/*` routes
export function createRateLimiter(max = MAX, isAPILimiter = false) {
export function createRateLimiter(max = MAX) {
return rateLimit({
// 1 minute
windowMs: EXPIRES_IN_AS_SECONDS * 1000,
Expand Down Expand Up @@ -47,14 +47,9 @@ export function createRateLimiter(max = MAX, isAPILimiter = false) {
return true
}

// We handle /api/* routes with a separate rate limiter
// When it is a separate rate limiter, isAPILimiter will be passed as true
if (req.path.startsWith('/api/') || isAPILimiter) {
return false
}

// If the request is not suspicious, don't rate limit it
if (!isSuspiciousRequest(req)) {
// If the query string looks totally regular and is not a
// search endpoint, then skip
if (!isSuspiciousSearchRequest(req)) {
return true
}

Expand Down Expand Up @@ -137,7 +132,14 @@ const MISC_KEYS = [
* @param {Request} req
* @returns boolean
*/
function isSuspiciousRequest(req: Request) {
function isSuspiciousSearchRequest(req: Request) {
if (
req.originalUrl.includes('/api/search') ||
req.originalUrl.includes('/api/ai-search') ||
req.originalUrl.includes('/api/combined-search')
)
return false

const keys = Object.keys(req.query)

// Since this function can only speculate by query strings (at the
Expand Down