Skip to content

Commit e59edae

Browse files
committed
feat: add github releases schema in collection type
1 parent e5b2463 commit e59edae

5 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"kind": "collectionType",
3+
"collectionName": "github_releases",
4+
"info": {
5+
"singularName": "github-release",
6+
"pluralName": "github-releases",
7+
"displayName": "Github Release"
8+
},
9+
"options": {
10+
"draftAndPublish": true
11+
},
12+
"pluginOptions": {},
13+
"attributes": {
14+
"version": {
15+
"type": "string"
16+
},
17+
"release_name": {
18+
"type": "string"
19+
},
20+
"release_url": {
21+
"type": "string"
22+
},
23+
"repository": {
24+
"type": "string"
25+
},
26+
"date": {
27+
"type": "string"
28+
},
29+
"changelog": {
30+
"type": "richtext"
31+
}
32+
}
33+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* github-release controller
3+
*/
4+
5+
import { factories } from '@strapi/strapi'
6+
7+
export default factories.createCoreController('api::github-release.github-release');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* github-release router
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreRouter('api::github-release.github-release');
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* github-release service
3+
*/
4+
5+
import { factories } from '@strapi/strapi';
6+
7+
export default factories.createCoreService('api::github-release.github-release');

types/generated/contentTypes.d.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,40 @@ export interface ApiFooterFooter extends Struct.SingleTypeSchema {
841841
};
842842
}
843843

844+
export interface ApiGithubReleaseGithubRelease
845+
extends Struct.CollectionTypeSchema {
846+
collectionName: 'github_releases';
847+
info: {
848+
displayName: 'Github Release';
849+
pluralName: 'github-releases';
850+
singularName: 'github-release';
851+
};
852+
options: {
853+
draftAndPublish: true;
854+
};
855+
attributes: {
856+
changelog: Schema.Attribute.RichText;
857+
createdAt: Schema.Attribute.DateTime;
858+
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
859+
Schema.Attribute.Private;
860+
date: Schema.Attribute.String;
861+
locale: Schema.Attribute.String & Schema.Attribute.Private;
862+
localizations: Schema.Attribute.Relation<
863+
'oneToMany',
864+
'api::github-release.github-release'
865+
> &
866+
Schema.Attribute.Private;
867+
publishedAt: Schema.Attribute.DateTime;
868+
release_name: Schema.Attribute.String;
869+
release_url: Schema.Attribute.String;
870+
repository: Schema.Attribute.String;
871+
updatedAt: Schema.Attribute.DateTime;
872+
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
873+
Schema.Attribute.Private;
874+
version: Schema.Attribute.String;
875+
};
876+
}
877+
844878
export interface ApiHeaderHeader extends Struct.SingleTypeSchema {
845879
collectionName: 'headers';
846880
info: {
@@ -2045,6 +2079,7 @@ declare module '@strapi/strapi' {
20452079
'api::enterprise-license.enterprise-license': ApiEnterpriseLicenseEnterpriseLicense;
20462080
'api::faq.faq': ApiFaqFaq;
20472081
'api::footer.footer': ApiFooterFooter;
2082+
'api::github-release.github-release': ApiGithubReleaseGithubRelease;
20482083
'api::header.header': ApiHeaderHeader;
20492084
'api::homepage.homepage': ApiHomepageHomepage;
20502085
'api::navbar.navbar': ApiNavbarNavbar;

0 commit comments

Comments
 (0)