Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/appview-v2-label-iss' into appvi…
Browse files Browse the repository at this point in the history
…ew-v2-testing
  • Loading branch information
devinivy committed Jan 9, 2024
2 parents 8576dc8 + 4c80b12 commit daf1af6
Show file tree
Hide file tree
Showing 521 changed files with 29,924 additions and 1,275 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages/api/src/client
packages/bsky/src/lexicon
packages/pds/src/lexicon
packages/ozone/src/lexicon
54 changes: 54 additions & 0 deletions .github/workflows/build-and-push-ozone-aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: build-and-push-ozone-aws
on:
push:
branches:
- main
env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }}
USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }}
PASSWORD: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_PASSWORD }}
IMAGE_NAME: ozone

jobs:
ozone-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME}}
password: ${{ env.PASSWORD }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./services/ozone/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
56 changes: 56 additions & 0 deletions .github/workflows/build-and-push-ozone-ghcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build-and-push-ozone-ghcr
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}

# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
ozone-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=ozone:,suffix=,format=long
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./services/ozone/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ codegen: ## Re-generate packages from lexicon/ files
cd packages/api; pnpm run codegen
cd packages/pds; pnpm run codegen
cd packages/bsky; pnpm run codegen
cd packages/ozone; pnpm run codegen
# clean up codegen output
pnpm format

Expand Down
1 change: 1 addition & 0 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
roots: ['<rootDir>/src', '<rootDir>/tests'],
transform: {
'^.+\\.(t|j)s?$': '@swc/jest',
'^.+\\.hbs$': require.resolve('handlebars-jest'),
},
transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
testRegex: '(/tests/.*.(test|spec)).(jsx?|tsx?)$',
Expand Down
3 changes: 2 additions & 1 deletion lexicons/app/bsky/feed/getAuthorFeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"knownValues": [
"posts_with_replies",
"posts_no_replies",
"posts_with_media"
"posts_with_media",
"posts_and_author_threads"
],
"default": "posts_with_replies"
}
Expand Down
3 changes: 2 additions & 1 deletion lexicons/app/bsky/notification/listNotifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"notifications": {
"type": "array",
"items": { "type": "ref", "ref": "#notification" }
}
},
"seenAt": { "type": "string", "format": "datetime" }
}
}
}
Expand Down
27 changes: 26 additions & 1 deletion lexicons/com/atproto/admin/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"#modEventLabel",
"#modEventAcknowledge",
"#modEventEscalate",
"#modEventMute"
"#modEventMute",
"#modEventResolveAppeal"
]
},
"subject": {
Expand Down Expand Up @@ -167,9 +168,18 @@
"type": "string",
"format": "datetime"
},
"lastAppealedAt": {
"type": "string",
"format": "datetime",
"description": "Timestamp referencing when the author of the subject appealed a moderation action"
},
"takendown": {
"type": "boolean"
},
"appealed": {
"type": "boolean",
"description": "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."
},
"suspendUntil": {
"type": "string",
"format": "datetime"
Expand Down Expand Up @@ -284,6 +294,7 @@
"did": { "type": "string", "format": "did" },
"handle": { "type": "string", "format": "handle" },
"email": { "type": "string" },
"relatedRecords": { "type": "array", "items": { "type": "unknown" } },
"indexedAt": { "type": "string", "format": "datetime" },
"invitedBy": {
"type": "ref",
Expand Down Expand Up @@ -469,6 +480,16 @@
}
}
},
"modEventResolveAppeal": {
"type": "object",
"description": "Resolve appeal on a subject",
"properties": {
"comment": {
"type": "string",
"description": "Describe resolution."
}
}
},
"modEventComment": {
"type": "object",
"description": "Add a comment to a subject",
Expand Down Expand Up @@ -557,6 +578,10 @@
"subjectLine": {
"type": "string",
"description": "The subject line of the email sent to the user."
},
"comment": {
"type": "string",
"description": "Additional comment about the outgoing comm."
}
}
}
Expand Down
36 changes: 36 additions & 0 deletions lexicons/com/atproto/admin/getAccountInfos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"lexicon": 1,
"id": "com.atproto.admin.getAccountInfos",
"defs": {
"main": {
"type": "query",
"description": "Get details about some accounts.",
"parameters": {
"type": "params",
"required": ["dids"],
"properties": {
"dids": {
"type": "array",
"items": { "type": "string", "format": "did" }
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["infos"],
"properties": {
"infos": {
"type": "array",
"items": {
"type": "ref",
"ref": "com.atproto.admin.defs#accountView"
}
}
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions lexicons/com/atproto/admin/queryModerationStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
"type": "boolean",
"description": "Get subjects that were taken down"
},
"appealed": {
"type": "boolean",
"description": "Get subjects in unresolved appealed status"
},
"limit": {
"type": "integer",
"minimum": 1,
Expand Down
6 changes: 5 additions & 1 deletion lexicons/com/atproto/admin/sendEmail.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"recipientDid": { "type": "string", "format": "did" },
"content": { "type": "string" },
"subject": { "type": "string" },
"senderDid": { "type": "string", "format": "did" }
"senderDid": { "type": "string", "format": "did" },
"comment": {
"type": "string",
"description": "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"
}
}
}
},
Expand Down
7 changes: 6 additions & 1 deletion lexicons/com/atproto/moderation/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"com.atproto.moderation.defs#reasonMisleading",
"com.atproto.moderation.defs#reasonSexual",
"com.atproto.moderation.defs#reasonRude",
"com.atproto.moderation.defs#reasonOther"
"com.atproto.moderation.defs#reasonOther",
"com.atproto.moderation.defs#reasonAppeal"
]
},
"reasonSpam": {
Expand All @@ -36,6 +37,10 @@
"reasonOther": {
"type": "token",
"description": "Other: reports not falling under another report category"
},
"reasonAppeal": {
"type": "token",
"description": "Appeal: appeal a previously taken moderation action"
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
"dotenv": "^16.0.3",
"esbuild": "^0.14.48",
"esbuild-node-externals": "^1.5.0",
"esbuild-plugin-copy": "^1.6.0",
"esbuild-plugin-handlebars": "^1.0.2",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"handlebars-jest": "^1.0.0",
"jest": "^28.1.2",
"node-gyp": "^9.3.1",
"pino-pretty": "^9.1.0",
Expand Down
39 changes: 39 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# @atproto/api

## 0.8.0

### Minor Changes

- [#2010](https://github.com/bluesky-social/atproto/pull/2010) [`14067733`](https://github.com/bluesky-social/atproto/commit/140677335f76b99129c1f593d9e11d64624386c6) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Improve `resumeSession` event emission. It will no longer double emit when some
requests fail, and the `create-failed` event has been replaced by `expired`
where appropriate, and with a new event `network-error` where appropriate or an
unknown error occurs.

## 0.7.4

### Patch Changes

- [#1966](https://github.com/bluesky-social/atproto/pull/1966) [`8f3f43cb`](https://github.com/bluesky-social/atproto/commit/8f3f43cb40f79ff7c52f81290daec55cfb000093) Thanks [@pfrazee](https://github.com/pfrazee)! - Fix to the application of the no-unauthenticated label

## 0.7.3

### Patch Changes

- [#1962](https://github.com/bluesky-social/atproto/pull/1962) [`7dec9df3`](https://github.com/bluesky-social/atproto/commit/7dec9df3b583ee8c06c0c6a7e32c259820dc84a5) Thanks [@pfrazee](https://github.com/pfrazee)! - Add seenAt time to listNotifications output

## 0.7.2

### Patch Changes

- [#1776](https://github.com/bluesky-social/atproto/pull/1776) [`ffe39aae`](https://github.com/bluesky-social/atproto/commit/ffe39aae8394394f73bbfaa9047a8b5818aa053a) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `posts_and_author_threads` filter to `getAuthorFeed`

## 0.7.1

### Patch Changes

- [#1944](https://github.com/bluesky-social/atproto/pull/1944) [`60deea17`](https://github.com/bluesky-social/atproto/commit/60deea17622f7c574c18432a55ced4e1cdc1b3a1) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Strip trailing colon from URLs in rich-text facet detection.

## 0.7.0

### Minor Changes

- [#1937](https://github.com/bluesky-social/atproto/pull/1937) [`45352f9b`](https://github.com/bluesky-social/atproto/commit/45352f9b6d02aa405be94e9102424d983912ca5d) Thanks [@pfrazee](https://github.com/pfrazee)! - Add the !no-unauthenticated label to the moderation SDK

## 0.6.24

### Patch Changes
Expand Down
6 changes: 6 additions & 0 deletions packages/api/definitions/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"preferences": ["warn"],
"flags": [],
"onwarn": "blur"
},
{
"id": "!no-unauthenticated",
"preferences": ["hide"],
"flags": ["no-override", "unauthed"],
"onwarn": "blur"
}
]
},
Expand Down
14 changes: 14 additions & 0 deletions packages/api/definitions/locale/en/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
"description": "This content has received a general warning from moderators."
}
},
"!no-unauthenticated": {
"settings": {
"name": "Sign-in Required",
"description": "This user has requested that their account only be shown to signed-in users."
},
"account": {
"name": "Sign-in Required",
"description": "This user has requested that their account only be shown to signed-in users."
},
"content": {
"name": "Sign-in Required",
"description": "This user has requested that their content only be shown to signed-in users."
}
},
"dmca-violation": {
"settings": {
"name": "Copyright Violation",
Expand Down
1 change: 1 addition & 0 deletions packages/api/definitions/moderation-behaviors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface ModerationBehaviors {
configurations: Record<
string,
{
authed?: boolean
adultContentEnabled: boolean
settings: Record<string, LabelPreference>
}
Expand Down
Loading

0 comments on commit daf1af6

Please sign in to comment.