utilisation de clé redmine de l'utilisateur agirbot
This commit is contained in:
parent
48d648331c
commit
b42764aa4e
@ -1,9 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Lecture configuration
|
||||
CONFIG="/etc/drop.chapril.org/dropchaprilorg.conf"
|
||||
source ${CONFIG}
|
||||
# Lecture configuration drop
|
||||
CONFIG_DROP="/etc/drop.chapril.org/dropchaprilorg.conf"
|
||||
source ${CONFIG_DROP}
|
||||
|
||||
# Lecture configuration agirbot
|
||||
CONFIG_AGIRBOT="/etc/chagirbot/agiraprilorg.conf"
|
||||
source ${CONFIG_AGIRBOT}
|
||||
|
||||
main() {
|
||||
post_report
|
||||
@ -21,19 +24,19 @@ EOF
|
||||
|
||||
curl -s \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Redmine-API-Key: ${REDMINE_API_KEY}" \
|
||||
-H "X-Redmine-API-Key: ${key}" \
|
||||
-X PUT --data-binary "@${datafile}" \
|
||||
"${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json"
|
||||
rm "${datafile}"
|
||||
}
|
||||
|
||||
last_comment_date() {
|
||||
curl -H "X-Redmine-API-Key: ${REDMINE_API_KEY}" -s "${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json?include=journals" \
|
||||
curl -H "X-Redmine-API-Key: ${key}" -s "${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json?include=journals" \
|
||||
| jq '.issue.journals | last | .created_on'
|
||||
}
|
||||
|
||||
list() {
|
||||
curl -H "X-Redmine-API-Key: ${REDMINE_API_KEY}" -s "${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json?include=journals" \
|
||||
curl -H "X-Redmine-API-Key: ${key}" -s "${REDMINE_BASE_URL}/issues/${REDMINE_TICKET_ID}.json?include=journals" \
|
||||
| jq '.issue.journals[] | [.user.name, .notes]'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user