File tree 2 files changed +41
-1
lines changed
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 7
7
- " 3.6"
8
8
- " 3.7"
9
9
- " 3.8"
10
- - " 3.9"
10
+ - " 3.9-dev "
11
11
12
12
matrix :
13
13
allow_failures :
Original file line number Diff line number Diff line change @@ -2181,3 +2181,43 @@ def get_associated_build_statuses(self, commit):
2181
2181
url = '/rest/build-status/2.0/commits/{commitId}' .format (commitId = commit )
2182
2182
2183
2183
return self .get (url )
2184
+
2185
+ def get_announcement_banner (self ):
2186
+ """
2187
+ Gets the announcement banner, if one exists and is available to the user
2188
+ :return:
2189
+ """
2190
+ if not self .cloud :
2191
+ url = "rest/api/1.0/admin/banner"
2192
+ else :
2193
+ url = "rest/api/2.0/admin/banner"
2194
+ return self .get (url )
2195
+
2196
+ def set_announcement_banner (self , body ):
2197
+ """
2198
+ Sets the announcement banner with the provided JSON.
2199
+ Only users authenticated as Admins may call this resource
2200
+ :param body
2201
+ {
2202
+ "id": "https://docs.atlassian.com/jira/REST/schema/rest-announcement-banner#",
2203
+ "title": "Rest Announcement Banner",
2204
+ "type": "object"
2205
+ }
2206
+ :return:
2207
+ """
2208
+ if not self .cloud :
2209
+ url = "rest/api/1.0/admin/banner"
2210
+ else :
2211
+ url = "rest/api/2.0/admin/banner"
2212
+ return self .put (url , data = body )
2213
+
2214
+ def delete_announcement_banner (self ):
2215
+ """
2216
+ Gets the announcement banner, if one exists and is available to the user
2217
+ :return:
2218
+ """
2219
+ if not self .cloud :
2220
+ url = "rest/api/1.0/admin/banner"
2221
+ else :
2222
+ url = "rest/api/2.0/admin/banner"
2223
+ return self .delete (url )
You can’t perform that action at this time.
0 commit comments