Skip to content

Commit 52893a6

Browse files
author
Sarah Edwards
authored
Sunset content attachments (#23285)
1 parent 5b74a7d commit 52893a6

9 files changed

Lines changed: 388 additions & 11 deletions

File tree

content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ The complete list of available query parameters, permissions, and events is list
6060
`webhook_active` | `boolean` | Set to `false` to disable webhook. Webhook is enabled by default.
6161
`webhook_url` | `string` | The full URL that you would like to send webhook event payloads to.
6262
{% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details.
63-
{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.
64-
`domain` | `string` | The URL of a content reference.
63+
{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.{% ifversion ghes < 3.4 %}
64+
`domain` | `string` | The URL of a content reference.{% endif %}
6565
`single_file_name` | `string` | This is a narrowly-scoped permission that allows the app to access a single file in any repository. When you set the `single_file` permission to `read` or `write`, this field provides the path to the single file your {% data variables.product.prodname_github_app %} will manage. {% ifversion fpt or ghes or ghec %} If you need to manage multiple files, see `single_file_paths` below. {% endif %}{% ifversion fpt or ghes or ghec %}
6666
`single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %}
6767

@@ -73,8 +73,8 @@ Permission | Description
7373
---------- | -----------
7474
[`administration`](/rest/reference/permissions-required-for-github-apps/#permission-on-administration) | Grants access to various endpoints for organization and repository administration. Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghec %}
7575
[`blocking`](/rest/reference/permissions-required-for-github-apps/#permission-on-blocking) | Grants access to the [Blocking Users API](/rest/reference/users#blocking). Can be one of: `none`, `read`, or `write`.{% endif %}
76-
[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.
77-
`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.
76+
[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.{% ifversion ghes < 3.4 %}
77+
`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.{% endif %}
7878
[`contents`](/rest/reference/permissions-required-for-github-apps/#permission-on-contents) | Grants access to various endpoints that allow you to modify repository contents. Can be one of: `none`, `read`, or `write`.
7979
[`deployments`](/rest/reference/permissions-required-for-github-apps/#permission-on-deployments) | Grants access to the [Deployments API](/rest/reference/repos#deployments). Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghes or ghec %}
8080
[`emails`](/rest/reference/permissions-required-for-github-apps/#permission-on-emails) | Grants access to the [Emails API](/rest/reference/users#emails). Can be one of: `none`, `read`, or `write`.{% endif %}
@@ -109,8 +109,8 @@ Webhook event name | Required permission | Description
109109
------------------ | ------------------- | -----------
110110
[`check_run`](/webhooks/event-payloads/#check_run) |`checks` | {% data reusables.webhooks.check_run_short_desc %}
111111
[`check_suite`](/webhooks/event-payloads/#check_suite) |`checks` | {% data reusables.webhooks.check_suite_short_desc %}
112-
[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}
113-
[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}
112+
[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}{% ifversion ghes < 3.4 %}
113+
[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}{% endif %}
114114
[`create`](/webhooks/event-payloads/#create) | `contents` | {% data reusables.webhooks.create_short_desc %}
115115
[`delete`](/webhooks/event-payloads/#delete) | `contents` | {% data reusables.webhooks.delete_short_desc %}
116116
[`deployment`](/webhooks/event-payloads/#deployment) | `deployments` | {% data reusables.webhooks.deployment_short_desc %}

content/developers/apps/guides/using-content-attachments.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ redirect_from:
55
- /apps/using-content-attachments
66
- /developers/apps/using-content-attachments
77
versions:
8-
fpt: '*'
9-
ghes: '*'
10-
ghae: '*'
11-
ghec: '*'
8+
ghes: '<3.4'
129
topics:
1310
- GitHub Apps
1411
---

content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ Key | Type | Description
218218
219219
{{ webhookPayloadsForCurrentVersion.commit_comment.created }}
220220
221+
{% ifversion ghes < 3.4 %}
221222
## content_reference
222223
223224
{% data reusables.webhooks.content_reference_short_desc %}
@@ -232,6 +233,7 @@ Webhook events are triggered based on the specificity of the domain you register
232233
233234
{{ webhookPayloadsForCurrentVersion.content_reference.created }}
234235
236+
{% endif %}
235237
## create
236238
237239
{% data reusables.webhooks.create_short_desc %}

content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ For more information, see "[Autolinked references and URLs](/articles/autolinked
242242

243243
{% data reusables.repositories.autolink-references %}
244244

245+
{% ifversion ghes < 3.4 %}
245246
## Content attachments
246247

247248
Some {% data variables.product.prodname_github_apps %} provide information in {% data variables.product.product_name %} for URLs that link to their registered domains. {% data variables.product.product_name %} renders the information provided by the app under the URL in the body or comment of an issue or pull request.
@@ -252,7 +253,7 @@ To see content attachments, you must have a {% data variables.product.prodname_g
252253

253254
Content attachments will not be displayed for URLs that are part of a markdown link.
254255

255-
For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."
256+
For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."{% endif %}
256257

257258
## Uploading assets
258259

content/rest/overview/api-previews.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,15 @@ You can now configure whether organization members can create repositories and w
183183

184184
{% endif %}
185185

186+
{% ifversion ghes < 3.4 %}
186187
## Content attachments
187188

188189
You can now provide more information in GitHub for URLs that link to registered domains by using the {% data variables.product.prodname_unfurls %} API. See "[Using content attachments](/apps/using-content-attachments/)" for more details.
189190

190191
**Custom media types:** `corsair-preview`
191192
**Announced:** [2018-12-10](https://developer.github.com/changes/2018-12-10-content-attachments-api/)
192193

194+
{% endif %}
193195
{% ifversion ghae or ghes < 3.3 %}
194196

195197
## Enable and disable Pages

lib/webhooks/static/dotcom/content_reference.created.payload.json renamed to lib/webhooks/static/ghes-3.0/content_reference.created.payload.json

File renamed without changes.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"action": "created",
3+
"content_reference": {
4+
"id": 17,
5+
"node_id": "MDE2OkNvbnRlbnRSZWZlcmVuY2UxNjA5",
6+
"reference": "https://errors.ai/"
7+
},
8+
"repository": {
9+
"id": 145551601,
10+
"node_id": "MDEwOlJlcG9zaXRvcnkxNDU1NTE2MDE=",
11+
"name": "hello-world",
12+
"full_name": "octocoders/hello-world",
13+
"private": true,
14+
"owner": {
15+
"login": "Codertocat",
16+
"id": 7718702,
17+
"node_id": "MDQ6VXNlcjc3MTg3MDI=",
18+
"avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4",
19+
"gravatar_id": "",
20+
"url": "https://api.github.com/users/Codertocat",
21+
"html_url": "https://github.com/Codertocat",
22+
"followers_url": "https://api.github.com/users/Codertocat/followers",
23+
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
24+
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
25+
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
26+
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
27+
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
28+
"repos_url": "https://api.github.com/users/Codertocat/repos",
29+
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
30+
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
31+
"type": "User",
32+
"site_admin": true
33+
},
34+
"html_url": "https://github.com/Codertocat/hello-world",
35+
"description": null,
36+
"fork": false,
37+
"url": "https://api.github.com/repos/Codertocat/hello-world",
38+
"forks_url": "https://api.github.com/repos/Codertocat/hello-world/forks",
39+
"keys_url": "https://api.github.com/repos/Codertocat/hello-world/keys{/key_id}",
40+
"collaborators_url": "https://api.github.com/repos/Codertocat/hello-world/collaborators{/collaborator}",
41+
"teams_url": "https://api.github.com/repos/Codertocat/hello-world/teams",
42+
"hooks_url": "https://api.github.com/repos/Codertocat/hello-world/hooks",
43+
"issue_events_url": "https://api.github.com/repos/Codertocat/hello-world/issues/events{/number}",
44+
"events_url": "https://api.github.com/repos/Codertocat/hello-world/events",
45+
"assignees_url": "https://api.github.com/repos/Codertocat/hello-world/assignees{/user}",
46+
"branches_url": "https://api.github.com/repos/Codertocat/hello-world/branches{/branch}",
47+
"tags_url": "https://api.github.com/repos/Codertocat/hello-world/tags",
48+
"blobs_url": "https://api.github.com/repos/Codertocat/hello-world/git/blobs{/sha}",
49+
"git_tags_url": "https://api.github.com/repos/Codertocat/hello-world/git/tags{/sha}",
50+
"git_refs_url": "https://api.github.com/repos/Codertocat/hello-world/git/refs{/sha}",
51+
"trees_url": "https://api.github.com/repos/Codertocat/hello-world/git/trees{/sha}",
52+
"statuses_url": "https://api.github.com/repos/Codertocat/hello-world/statuses/{sha}",
53+
"languages_url": "https://api.github.com/repos/Codertocat/hello-world/languages",
54+
"stargazers_url": "https://api.github.com/repos/Codertocat/hello-world/stargazers",
55+
"contributors_url": "https://api.github.com/repos/Codertocat/hello-world/contributors",
56+
"subscribers_url": "https://api.github.com/repos/Codertocat/hello-world/subscribers",
57+
"subscription_url": "https://api.github.com/repos/Codertocat/hello-world/subscription",
58+
"commits_url": "https://api.github.com/repos/Codertocat/hello-world/commits{/sha}",
59+
"git_commits_url": "https://api.github.com/repos/Codertocat/hello-world/git/commits{/sha}",
60+
"comments_url": "https://api.github.com/repos/Codertocat/hello-world/comments{/number}",
61+
"issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world/issues/comments{/number}",
62+
"contents_url": "https://api.github.com/repos/Codertocat/hello-world/contents/{+path}",
63+
"compare_url": "https://api.github.com/repos/Codertocat/hello-world/compare/{base}...{head}",
64+
"merges_url": "https://api.github.com/repos/Codertocat/hello-world/merges",
65+
"archive_url": "https://api.github.com/repos/Codertocat/hello-world/{archive_format}{/ref}",
66+
"downloads_url": "https://api.github.com/repos/Codertocat/hello-world/downloads",
67+
"issues_url": "https://api.github.com/repos/Codertocat/hello-world/issues{/number}",
68+
"pulls_url": "https://api.github.com/repos/Codertocat/hello-world/pulls{/number}",
69+
"milestones_url": "https://api.github.com/repos/Codertocat/hello-world/milestones{/number}",
70+
"notifications_url": "https://api.github.com/repos/Codertocat/hello-world/notifications{?since,all,participating}",
71+
"labels_url": "https://api.github.com/repos/Codertocat/hello-world/labels{/name}",
72+
"releases_url": "https://api.github.com/repos/Codertocat/hello-world/releases{/id}",
73+
"deployments_url": "https://api.github.com/repos/Codertocat/hello-world/deployments",
74+
"created_at": "2018-08-21T10:58:58Z",
75+
"updated_at": "2018-08-21T10:59:01Z",
76+
"pushed_at": "2018-08-21T10:59:00Z",
77+
"git_url": "git://github.com/Codertocat/hello-world.git",
78+
"ssh_url": "git@github.com:Codertocat/hello-world.git",
79+
"clone_url": "https://github.com/Codertocat/hello-world.git",
80+
"svn_url": "https://github.com/Codertocat/hello-world",
81+
"homepage": null,
82+
"size": 0,
83+
"stargazers_count": 0,
84+
"watchers_count": 0,
85+
"language": null,
86+
"has_issues": true,
87+
"has_projects": true,
88+
"has_downloads": true,
89+
"has_wiki": true,
90+
"has_pages": false,
91+
"forks_count": 0,
92+
"mirror_url": null,
93+
"archived": false,
94+
"open_issues_count": 2,
95+
"license": null,
96+
"forks": 0,
97+
"open_issues": 2,
98+
"watchers": 0,
99+
"default_branch": "master"
100+
},
101+
"sender": {
102+
"login": "Codertocat",
103+
"id": 7718702,
104+
"node_id": "MDQ6VXNlcjc3MTg3MDI=",
105+
"avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4",
106+
"gravatar_id": "",
107+
"url": "https://api.github.com/users/Codertocat",
108+
"html_url": "https://github.com/Codertocat",
109+
"followers_url": "https://api.github.com/users/Codertocat/followers",
110+
"following_url": "https://api.github.com/users/Codertocat/following{/other_user}",
111+
"gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}",
112+
"starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}",
113+
"subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions",
114+
"organizations_url": "https://api.github.com/users/Codertocat/orgs",
115+
"repos_url": "https://api.github.com/users/Codertocat/repos",
116+
"events_url": "https://api.github.com/users/Codertocat/events{/privacy}",
117+
"received_events_url": "https://api.github.com/users/Codertocat/received_events",
118+
"type": "User",
119+
"site_admin": true
120+
},
121+
"installation": {
122+
"id": 371641,
123+
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMzcxNjQx"
124+
}
125+
}

0 commit comments

Comments
 (0)