Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to numbers in is_obsolete and is_patch for attachment #162

Merged
merged 3 commits into from
Nov 21, 2024
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
35 changes: 0 additions & 35 deletions .github/workflows/differential-shellcheck.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish package

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

- name: Install
run: yarn install

- name: Compile
run: yarn build

- name: Test
run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install
run: yarn install

- name: Compile
run: yarn build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ export interface Attachment {
summary: string;
content_type: string;
is_private: boolean | int;
is_obsolete: boolean;
is_patch: boolean;
is_obsolete: boolean | int;
is_patch: boolean | int;
creator: string;
flags: Flag[];
}
Expand All @@ -425,8 +425,8 @@ export const AttachmentSpec: ObjectSpec<Attachment> = {
summary: string,
content_type: string,
is_private: either(boolean, int),
is_obsolete: boolean,
is_patch: boolean,
is_obsolete: either(boolean, int),
is_patch: either(boolean, int),
creator: string,
flags: array(object(FlagSpec)),
};
Expand Down Expand Up @@ -470,7 +470,7 @@ export interface UpdateAttachmentContent {
content_type?: string;
is_patch?: boolean;
is_private?: boolean;
is_obsolete?: boolean;
is_obsolete?: boolean | int;
flags?: UpdateFlag[];
}

Expand Down