add: message template content

This commit is contained in:
yystopf 2021-09-14 17:39:58 +08:00
parent 91676492ab
commit ca4f416f0a
38 changed files with 331 additions and 198 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Date: 2021-03-01 10:35:21
* @LastEditors: viletyy
* @LastEditTime: 2021-09-13 17:54:51
* @LastEditTime: 2021-09-14 17:34:40
* @FilePath: /forgeplus/app/docs/slate/source/includes/_users.md
-->
# Users
@ -101,7 +101,7 @@ await octokit.request('GET /api/users/:login/messages.json')
|OrganizationJoined | 账号被拉入组织 |
|OrganizationLeft | 账号被移出组织 |
|OrganizationRole | 账号组织权限变更 |
|ProjectDelete | 我关注的仓库被删除 |
|ProjectDeleted | 我关注的仓库被删除 |
|ProjectFollowed | 我管理的仓库被关注 |
|ProjectForked | 我管理的仓库被复刻 |
|ProjectIssue | 我管理/关注的仓库有新的易修 |
@ -119,7 +119,9 @@ await octokit.request('GET /api/users/:login/messages.json')
|PullRequestAssigned | 有新指派给我的合并请求 |
|PullReuqestAtme | 在合并请求中@我 |
|PullRequestChanged | 我创建或负责的合并请求状态变更 |
|PullRequestJournal | 我创建或负责的合并请求有新的评论 |
|PullRequestClosed | 我创建或负责的合并请求被关闭 |
|PullRequestJournal | 我创建或负责的合并请求有新的评论 |
|PullRequestMerged | 我创建或负责的合并请求被合并 |
> 返回的JSON示例:

View File

@ -2,13 +2,54 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
class MessageTemplate < ApplicationRecord
class MessageTemplate <ApplicationRecord
def self.build_init_data
self.create(type: 'MessageTemplate::FollowedTip', sys_notice: '<b>{nickname}</b>关注了你', notification_url: '{baseurl}/{login}')
self.create(type: 'MessageTemplate::IssueAssigned', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>指派给你一个易修:<b>{title}<b>', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::IssueAssignerExpire', sys_notice: '您负责的易修<b>{title}</b>已临近截止日期,请尽快处理', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::IssueAtme', sys_notice: '<b>{nickname}</b>在易修<b>{title}</b>中@我', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::IssueChanged', sys_notice: '在项目{nickname2}/{repository1}的易修<b>{title}</b>中:{ifassigner}{nickname1}将负责人从<b>{assigner1}</b>修改为<b>{assigner1}</b>{endassigner}<br/>{ifstatus}{nickname1}将状态从<b>{status1}</b>修改为<b>{status1}</b>{endstatus}<br/>{iftracker}{nickname1}将类型从<b>{tracker1}</b>修改为<b>{tracker1}</b>{endtracker}<br/>{ifpriority}{nickname1}将优先度从<b>{priority1}</b>修改为<b>{priority1}</b>{endpriority}<br/>{ifmilestone}{nickname1}将里程碑从<b>{milestone1}</b>修改为<b>{milestone1}</b>{endmilestone}<br/>{iftag}{nickname1}将标签从<b>{tag1}</b>修改为<b>{tag1}</b>{endtag}<br/>{ifdoneratio}{nickname1}将完成度从<b>{doneratio1}</b>修改为<b>{doneratio1}</b>{enddoneratio}<br/>{ifbranch}{nickname1}将指定分支从<b>{branch1}</b>修改为<b>{branch1}</b>{endbranch}<br/>{ifstartdate}{nickname1}将开始日期从<b>{startdate1}</b>修改为<b>{startdate1}</b>{endstartdate}<br/>{ifduedate}{nickname1}将结束日期从<b>{duedate1}</b>修改为<b>{duedate1}</b>{endduedate}', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::IssueCreatorExpire', sys_notice: '您发布的易修<b>{title}</b>已临近截止日期,请尽快处理', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::IssueDeleted', sys_notice: '{nickname}已将易修<b>{title}</b>删除', notification_url: '')
self.create(type: 'MessageTemplate::IssueJournal', sys_notice: '{nickname}评论易修{title}<b>{notes}</b>', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::LoginIpTip', sys_notice: '您的账号{nickname}于{login_time)在非常用的IP地址{ip}登录,如非本人操作,请立即修改密码', notification_url: '')
self.create(type: 'MessageTemplate::OrganizationJoined', sys_notice: '你已加入<b>{organization}</b>组织', notification_url: '{baseurl}/{login}')
self.create(type: 'MessageTemplate::OrganizationLeft', sys_notice: '你已被移出<b>{organization}</b>组织', notification_url: '')
self.create(type: 'MessageTemplate::OrganizationRole', sys_notice: '组织{organization}已把你的角色改为<b>{role}</b>', notification_url: '{baseurl}/{owner}')
self.create(type: 'MessageTemplate::ProjectDeleted', sys_notice: '你关注的仓库{nickname}/{repository}已被删除', notification_url: '')
self.create(type: 'MessageTemplate::ProjectFollowed', sys_notice: '<b>{nickname}</b>关注了你管理的仓库', notification_url: '{baseurl}/{login}')
self.create(type: 'MessageTemplate::ProjectForked', sys_notice: '<b>{nickname1}</b>复刻了你管理的仓库{nickname1}/{repository1}到{nickname2}/{repository2}', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectIssue', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>新建易修:<b>{title}</b>', notification_url: '{baseurl}/{owner}/{identifier}/issues/{id}')
self.create(type: 'MessageTemplate::ProjectJoined', sys_notice: '你已加入<b>{repository}</b>项目', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectLeft', sys_notice: '你已被移出<b>{repository}</b>项目', notification_url: '')
self.create(type: 'MessageTemplate::ProjectMemberJoined', sys_notice: '<b>{nickname1}</b>已加入项目<b>{nickname2}/{repository}</b>', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectMemberLeft', sys_notice: '<b>{nickname1}</b>已被移出项目<b>{nickname2}/{repository}</b>', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectMilestone', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>创建了一个里程碑:<b>{title}</b>', notification_url: '{baseurl}/{owner}/{identifier}/milestones/{id}')
self.create(type: 'MessageTemplate::ProjectPraised', sys_notice: '<b>{nickname}</b>点赞了你管理的仓库', notification_url: '{baseurl}/{login}')
self.create(type: 'MessageTemplate::ProjectPullRequest', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>提交了一个合并请求:<b>{title}</b>', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
self.create(type: 'MessageTemplate::ProjectRole', sys_notice: '仓库{repository}已把你的角色改为<b>{role}</b>', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectSettingChanged', sys_notice: '<b>{nickname1}</b>更改了{nickname2}/{repository}仓库设置:{ifname}更改项目名称为"<b>{name}</b>";{endname}{ifdescription}更改项目简介为"<b>{description}</b>";{enddescription}{ifcategory}更改项目类别为"<b>{category}</b>";{endcategory}{iflanguage}更改项目语言为"<b>{language}</b>";{endlanguage}{ifpermission}将仓库设为"<b>{permission}</b>";{endpermission}{ifnavbar}将项目导航更改为"<b>{navbar}</b>";{endnavbar}', notification_url: '{baseurl}/{owner}/{identifier}/settings')
self.create(type: 'MessageTemplate::ProjectTransfer', sys_notice: '你关注的仓库{nickname1}/{repository1}已被转移至{nickname2}/{repository2}', notification_url: '{baseurl}/{owner}/{identifier}')
self.create(type: 'MessageTemplate::ProjectVersion', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>创建了发行版:<b>{title}</b>', notification_url: '{baseurl}/{owner}/{identifier}/releases')
self.create(type: 'MessageTemplate::PullRequestAssigned', sys_notice: '{nickname1}在<b>{nickname2}/{repository}</b>指派给你一个合并请求:<b>{title}<b>', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
self.create(type: 'MessageTemplate::PullRequestAtme', sys_notice: '<b>{nickname}</b>在合并请求<b>{title}</b>中@我', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
self.create(type: 'MessageTemplate::PullRequestChanged', sys_notice: '在项目{nickname2}/{repository1}的合并请求<b>{title}</b>中:{ifassigner}{nickname1}将审查成员从<b>{assigner1}</b>修改为<b>{assigner1}</b>{endassigner}<br/>{ifmilestone}{nickname1}将里程碑从<b>{milestone1}</b>修改为<b>{milestone1}</b>{endmilestone}<br/>{iftag}{nickname1}将标签从<b>{tag1}</b>修改为<b>{tag1}</b>{endtag}<br/>{ifpriority}{nickname1}将优先度从<b>{priority1}</b>修改为<b>{priority1}</b>{endpriority}<br/>', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
self.create(type: 'MessageTemplate::PullRequestClosed', sys_notice: '你提交的合并请求:{title]被拒绝', notification_url: '')
self.create(type: 'MessageTemplate::PullRequestJournal', sys_notice: '{nickname}评论合并请求{title}<b>{notes}</b>', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
self.create(type: 'MessageTemplate::PullRequestMerged', sys_notice: '你提交的合并请求:{title}被合并', notification_url: '{baseurl}/{owner}/{identifier}/pulls/{id}/Messagecount')
end
def self.sys_notice
self.last&.sys_notice
end
end

View File

@ -0,0 +1,16 @@
# == Schema Information
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 被关注提示
class MessageTemplate::FollowedTip < MessageTemplate
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 有新指派给我的易修

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我负责的易修截止日期到达最后一天

View File

@ -2,14 +2,15 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 在易修中@我
class MessageTemplate::IssueAtme < MessageTemplate
end
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的易修状态变更

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建的易修截止日期到达最后一天

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的易修删除

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的易修有新的评论

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 登录异常提示

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号被拉入组织

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号被移出组织

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号组织权限变更

View File

@ -1,15 +0,0 @@
# == Schema Information
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
#
# 我关注的仓库被删除
class MessageTemplate::ProjectDelete < MessageTemplate
end

View File

@ -0,0 +1,16 @@
# == Schema Information
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我关注的仓库被删除
class MessageTemplate::ProjectDeleted < MessageTemplate
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库被关注

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库被复刻

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理/关注的仓库有新的易修

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号被拉入项目

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号被移出项目

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库有成员加入

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库有成员移出

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库有新的里程碑

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库被点赞

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理/关注的仓库有新的合并请求

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 账号仓库权限变更

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我管理的仓库项目设置被更改

View File

@ -2,14 +2,15 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我关注的仓库被转移
class MessageTemplate::ProjectTransfer < MessageTemplate
end
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我关注的仓库有新的发行版

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 有新指派给我的合并请求

View File

@ -11,5 +11,5 @@
#
# 在合并请求中@我
class MessageTemplate::PullReuqestAtme < MessageTemplate
class MessageTemplate::PullRequestAtme < MessageTemplate
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的合并请求状态变更

View File

@ -0,0 +1,16 @@
# == Schema Information
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的合并请求被关闭
class MessageTemplate::PullRequestClosed < MessageTemplate
end

View File

@ -2,12 +2,13 @@
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的合并请求有新的评论

View File

@ -0,0 +1,16 @@
# == Schema Information
#
# Table name: message_templates
#
# id :integer not null, primary key
# type :string(255)
# sys_notice :text(65535)
# email :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# notification_url :string(255)
#
# 我创建或负责的合并请求被合并
class MessageTemplate::PullRequestMerged < MessageTemplate
end

View File

@ -0,0 +1,5 @@
class AddNotificationUrlToMessageTemplates < ActiveRecord::Migration[5.2]
def change
add_column :message_templates, :notification_url, :string
end
end

View File

@ -921,7 +921,7 @@ Success — a happy kitten is an authenticated kitten!
<!--
* @Date: 2021-03-01 10:35:21
* @LastEditors: viletyy
* @LastEditTime: 2021-09-13 17:54:51
* @LastEditTime: 2021-09-14 17:34:40
* @FilePath: /forgeplus/app/docs/slate/source/includes/_users.md
-->
<h1 id='users'>Users</h1><h2 id='1ae74893b1'>获取当前登陆用户信息</h2>
@ -1143,7 +1143,7 @@ Success — a happy kitten is an authenticated kitten!
<td>账号组织权限变更</td>
</tr>
<tr>
<td>ProjectDelete</td>
<td>ProjectDeleted</td>
<td>我关注的仓库被删除</td>
</tr>
<tr>
@ -1215,9 +1215,17 @@ Success — a happy kitten is an authenticated kitten!
<td>我创建或负责的合并请求状态变更</td>
</tr>
<tr>
<td>PullRequestClosed</td>
<td>我创建或负责的合并请求被关闭</td>
</tr>
<tr>
<td>PullRequestJournal</td>
<td>我创建或负责的合并请求有新的评论</td>
</tr>
<tr>
<td>PullRequestMerged</td>
<td>我创建或负责的合并请求被合并</td>
</tr>
</tbody></table>
<blockquote>