mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Update TGS DMAPI
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// tgstation-server DMAPI
|
// tgstation-server DMAPI
|
||||||
|
|
||||||
#define TGS_DMAPI_VERSION "5.2.9"
|
#define TGS_DMAPI_VERSION "5.2.10"
|
||||||
|
|
||||||
// All functions and datums outside this document are subject to change with any version and should not be relied on.
|
// All functions and datums outside this document are subject to change with any version and should not be relied on.
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
#define TGS_EVENT_REPO_CHECKOUT 1
|
#define TGS_EVENT_REPO_CHECKOUT 1
|
||||||
/// When the repository performs a fetch operation. No parameters
|
/// When the repository performs a fetch operation. No parameters
|
||||||
#define TGS_EVENT_REPO_FETCH 2
|
#define TGS_EVENT_REPO_FETCH 2
|
||||||
/// When the repository merges a pull request. Parameters: PR Number, PR Sha, (Nullable) Comment made by TGS user
|
/// When the repository test merges. Parameters: PR Number, PR Sha, (Nullable) Comment made by TGS user
|
||||||
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
|
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
|
||||||
/// Before the repository makes a sychronize operation. Parameters: Absolute repostiory path
|
/// Before the repository makes a sychronize operation. Parameters: Absolute repostiory path
|
||||||
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
|
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
|
||||||
@@ -190,21 +190,21 @@
|
|||||||
|
|
||||||
/// Represents a merge of a GitHub pull request.
|
/// Represents a merge of a GitHub pull request.
|
||||||
/datum/tgs_revision_information/test_merge
|
/datum/tgs_revision_information/test_merge
|
||||||
/// The pull request number.
|
/// The test merge number.
|
||||||
var/number
|
var/number
|
||||||
/// The pull request title when it was merged.
|
/// The test merge source's title when it was merged.
|
||||||
var/title
|
var/title
|
||||||
/// The pull request body when it was merged.
|
/// The test merge source's body when it was merged.
|
||||||
var/body
|
var/body
|
||||||
/// The GitHub username of the pull request's author.
|
/// The Username of the test merge source's author.
|
||||||
var/author
|
var/author
|
||||||
/// An http URL to the pull request.
|
/// An http URL to the test merge source.
|
||||||
var/url
|
var/url
|
||||||
/// The SHA of the pull request when that was merged.
|
/// The SHA of the test merge when that was merged.
|
||||||
var/pull_request_commit
|
var/pull_request_commit
|
||||||
/// ISO 8601 timestamp of when the pull request was merged.
|
/// ISO 8601 timestamp of when the test merge was created on TGS.
|
||||||
var/time_merged
|
var/time_merged
|
||||||
/// (Nullable) Comment left by the TGS user who initiated the merge..
|
/// Optional comment left by the TGS user who initiated the merge.
|
||||||
var/comment
|
var/comment
|
||||||
|
|
||||||
/// Represents a connected chat channel.
|
/// Represents a connected chat channel.
|
||||||
|
|||||||
@@ -98,18 +98,19 @@
|
|||||||
return json_encode(response)
|
return json_encode(response)
|
||||||
|
|
||||||
/datum/tgs_api/v5/OnTopic(T)
|
/datum/tgs_api/v5/OnTopic(T)
|
||||||
if(!initialized)
|
|
||||||
return FALSE //continue world/Topic
|
|
||||||
|
|
||||||
var/list/params = params2list(T)
|
var/list/params = params2list(T)
|
||||||
var/json = params[DMAPI5_TOPIC_DATA]
|
var/json = params[DMAPI5_TOPIC_DATA]
|
||||||
if(!json)
|
if(!json)
|
||||||
return FALSE
|
return FALSE // continue to /world/Topic
|
||||||
|
|
||||||
var/list/topic_parameters = json_decode(json)
|
var/list/topic_parameters = json_decode(json)
|
||||||
if(!topic_parameters)
|
if(!topic_parameters)
|
||||||
return TopicResponse("Invalid topic parameters json!");
|
return TopicResponse("Invalid topic parameters json!");
|
||||||
|
|
||||||
|
if(!initialized)
|
||||||
|
TGS_WARNING_LOG("Missed topic due to not being initialized: [T]")
|
||||||
|
return TRUE // too early to handle, but it's still our responsibility
|
||||||
|
|
||||||
var/their_sCK = topic_parameters[DMAPI5_PARAMETER_ACCESS_IDENTIFIER]
|
var/their_sCK = topic_parameters[DMAPI5_PARAMETER_ACCESS_IDENTIFIER]
|
||||||
if(their_sCK != access_identifier)
|
if(their_sCK != access_identifier)
|
||||||
return TopicResponse("Failed to decode [DMAPI5_PARAMETER_ACCESS_IDENTIFIER] from: [json]!");
|
return TopicResponse("Failed to decode [DMAPI5_PARAMETER_ACCESS_IDENTIFIER] from: [json]!");
|
||||||
|
|||||||
Reference in New Issue
Block a user