docs: test add link feature TUN-29
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
025ce562e4
commit
129c550d09
4
app.py
4
app.py
@ -71,9 +71,9 @@ def gitea_push():
|
|||||||
if request.headers.get('X-Gitea-Event') != 'push':
|
if request.headers.get('X-Gitea-Event') != 'push':
|
||||||
logger.error('Invalid event type: %s' % request.headers.get('X-Gitea-Event'))
|
logger.error('Invalid event type: %s' % request.headers.get('X-Gitea-Event'))
|
||||||
return jsonify({'message': 'Invalid event type'}), 400
|
return jsonify({'message': 'Invalid event type'}), 400
|
||||||
# check if it's a Linear issue
|
|
||||||
# linear issue id is like 'TUN-21'
|
|
||||||
headers = {'Authorization': LINEAR_API_KEY}
|
headers = {'Authorization': LINEAR_API_KEY}
|
||||||
|
|
||||||
|
# get all workflow states from linear
|
||||||
state_query = {'query': '{workflowStates(includeArchived:false) { edges { node { id name type } }}}'}
|
state_query = {'query': '{workflowStates(includeArchived:false) { edges { node { id name type } }}}'}
|
||||||
state_resp = requests.post(LINEAR_API_URL, json=state_query, headers=headers)
|
state_resp = requests.post(LINEAR_API_URL, json=state_query, headers=headers)
|
||||||
if state_resp.status_code != 200:
|
if state_resp.status_code != 200:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user