Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octokit/plugin-rest-endpoint-methods.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.5.0
Choose a base ref
...
head repository: octokit/plugin-rest-endpoint-methods.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.0.0
Choose a head ref
  • 3 commits
  • 24 files changed
  • 3 contributors

Commits on Apr 8, 2025

  1. chore(deps): update dependency sinon to v20 (#793)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 8, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    liggitt Jordan Liggitt
    Copy the full SHA
    9a98d4e View commit details
  2. build(deps): bump vite from 6.1.0 to 6.2.5 (#795)

    Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.1.0 to 6.2.5.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)
    
    ---
    updated-dependencies:
    - dependency-name: vite
      dependency-version: 6.2.5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 8, 2025

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    ying-jeanne Ying WANG
    Copy the full SHA
    aa576af View commit details

Commits on Apr 10, 2025

  1. feat: add new organization campaign endpoints, remove deprecated endp…

    …oints (#797)
    
    BREAKING CHANGE: remove deprecated copilot metrics endpoints
    BREAKING CHANGE: remove deprecated legacy projects endpoints
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
    renovate[bot] and wolfy1339 authored Apr 10, 2025
    Copy the full SHA
    4c8a166 View commit details
101 changes: 101 additions & 0 deletions docs/campaigns/createCampaign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
name: Create a campaign for an organization
example: octokit.rest.campaigns.createCampaign({ org, name, description, ends_at, code_scanning_alerts, code_scanning_alerts[].repository_id, code_scanning_alerts[].alert_numbers })
route: POST /orgs/{org}/campaigns
scope: campaigns
type: API method
---

# Create a campaign for an organization

Create a campaign for an organization.

The authenticated user must be an owner or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories included
in the campaign.

```js
octokit.rest.campaigns.createCampaign({
org,
name,
description,
ends_at,
code_scanning_alerts,
code_scanning_alerts[].repository_id,
code_scanning_alerts[].alert_numbers
})
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>org</td><td>yes</td><td>

The organization name. The name is not case sensitive.

</td></tr>
<tr><td>name</td><td>yes</td><td>

The name of the campaign

</td></tr>
<tr><td>description</td><td>yes</td><td>

A description for the campaign

</td></tr>
<tr><td>managers</td><td>no</td><td>

The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied.

</td></tr>
<tr><td>team_managers</td><td>no</td><td>

The slugs of the teams to set as the campaign managers.

</td></tr>
<tr><td>ends_at</td><td>yes</td><td>

The end date and time of the campaign. The date must be in the future.

</td></tr>
<tr><td>contact_link</td><td>no</td><td>

The contact link of the campaign. Must be a URI.

</td></tr>
<tr><td>code_scanning_alerts</td><td>yes</td><td>

The code scanning alerts to include in this campaign

</td></tr>
<tr><td>code_scanning_alerts[].repository_id</td><td>yes</td><td>

The repository id

</td></tr>
<tr><td>code_scanning_alerts[].alert_numbers</td><td>yes</td><td>

The alert numbers

</td></tr>
<tr><td>generate_issues</td><td>no</td><td>

If true, will automatically generate issues for the campaign. The default is false.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/campaigns/campaigns#create-a-campaign-for-an-organization).
48 changes: 48 additions & 0 deletions docs/campaigns/deleteCampaign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Delete a campaign for an organization
example: octokit.rest.campaigns.deleteCampaign({ org, campaign_number })
route: DELETE /orgs/{org}/campaigns/{campaign_number}
scope: campaigns
type: API method
---

# Delete a campaign for an organization

Deletes a campaign in an organization.

The authenticated user must be an owner or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

```js
octokit.rest.campaigns.deleteCampaign({
org,
campaign_number,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>org</td><td>yes</td><td>

The organization name. The name is not case sensitive.

</td></tr>
<tr><td>campaign_number</td><td>yes</td><td>

The campaign number.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/campaigns/campaigns#delete-a-campaign-for-an-organization).
48 changes: 48 additions & 0 deletions docs/campaigns/getCampaignSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Get a campaign for an organization
example: octokit.rest.campaigns.getCampaignSummary({ org, campaign_number })
route: GET /orgs/{org}/campaigns/{campaign_number}
scope: campaigns
type: API method
---

# Get a campaign for an organization

Gets a campaign for an organization.

The authenticated user must be an owner or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

```js
octokit.rest.campaigns.getCampaignSummary({
org,
campaign_number,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>org</td><td>yes</td><td>

The organization name. The name is not case sensitive.

</td></tr>
<tr><td>campaign_number</td><td>yes</td><td>

The campaign number.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/campaigns/campaigns#get-a-campaign-for-an-organization).
67 changes: 67 additions & 0 deletions docs/campaigns/listOrgCampaigns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: List campaigns for an organization
example: octokit.rest.campaigns.listOrgCampaigns({ org })
route: GET /orgs/{org}/campaigns
scope: campaigns
type: API method
---

# List campaigns for an organization

Lists campaigns in an organization.

The authenticated user must be an owner or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

```js
octokit.rest.campaigns.listOrgCampaigns({
org,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>org</td><td>yes</td><td>

The organization name. The name is not case sensitive.

</td></tr>
<tr><td>page</td><td>no</td><td>

The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

</td></tr>
<tr><td>per_page</td><td>no</td><td>

The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

</td></tr>
<tr><td>direction</td><td>no</td><td>

The direction to sort the results by.

</td></tr>
<tr><td>state</td><td>no</td><td>

If specified, only campaigns with this state will be returned.

</td></tr>
<tr><td>sort</td><td>no</td><td>

The property by which to sort the results.

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/campaigns/campaigns#list-campaigns-for-an-organization).
83 changes: 83 additions & 0 deletions docs/campaigns/updateCampaign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Update a campaign
example: octokit.rest.campaigns.updateCampaign({ org, campaign_number })
route: PATCH /orgs/{org}/campaigns/{campaign_number}
scope: campaigns
type: API method
---

# Update a campaign

Updates a campaign in an organization.

The authenticated user must be an owner or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

```js
octokit.rest.campaigns.updateCampaign({
org,
campaign_number,
});
```

## Parameters

<table>
<thead>
<tr>
<th>name</th>
<th>required</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr><td>org</td><td>yes</td><td>

The organization name. The name is not case sensitive.

</td></tr>
<tr><td>campaign_number</td><td>yes</td><td>

The campaign number.

</td></tr>
<tr><td>name</td><td>no</td><td>

The name of the campaign

</td></tr>
<tr><td>description</td><td>no</td><td>

A description for the campaign

</td></tr>
<tr><td>managers</td><td>no</td><td>

The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied.

</td></tr>
<tr><td>team_managers</td><td>no</td><td>

The slugs of the teams to set as the campaign managers.

</td></tr>
<tr><td>ends_at</td><td>no</td><td>

The end date and time of the campaign, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.

</td></tr>
<tr><td>contact_link</td><td>no</td><td>

The contact link of the campaign. Must be a URI.

</td></tr>
<tr><td>state</td><td>no</td><td>

Indicates whether a campaign is open or closed

</td></tr>
</tbody>
</table>

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/campaigns/campaigns#update-a-campaign).
2 changes: 1 addition & 1 deletion docs/issues/create.md
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ Logins for Users to assign to this issue. _NOTE: Only users with push access can
</td></tr>
<tr><td>type</td><td>no</td><td>

The name of the issue type to associate with this issue.
The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._

</td></tr>
</tbody>
2 changes: 1 addition & 1 deletion docs/issues/update.md
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ Usernames to assign to this issue. Pass one or more user logins to _replace_ the
</td></tr>
<tr><td>type</td><td>no</td><td>

The name of the issue type to associate with this issue or use `null` to remove the current issue type.
The name of the issue type to associate with this issue or use `null` to remove the current issue type. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.

</td></tr>
</tbody>
8 changes: 3 additions & 5 deletions docs/orgs/createIssueType.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ Create a new issue type for an organization.

You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the `admin:org` scope to use this endpoint.

```js
octokit.rest.orgs.createIssueType({
org,
@@ -45,11 +48,6 @@ Name of the issue type.

Whether or not the issue type is enabled at the organization level.

</td></tr>
<tr><td>is_private</td><td>no</td><td>

Whether or not the issue type is restricted to issues in private repositories.

</td></tr>
<tr><td>description</td><td>no</td><td>

Loading