-
Notifications
You must be signed in to change notification settings - Fork 10
Get notified on changes related to a corpus #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour cette contribution @sarah-ngn et @lildelfino.
On n'est pas loin d'avoir une fonctionnalité !
J'ai noté dans les commentaires ligne à ligne quelques améliorations à apporter.
Quand tout ceci sera fait, n'oubliez pas ensuite de présenter tout ça sous la forme d'un unique commit :
- dans la première ligne :
- avec préfixe standard (
FEATURE:
), - titre officiel en anglais (
Get notified on corpus changes.
),
- avec préfixe standard (
- dans la troisième ligne, mention du co-auteur sous la forme
Co-authored-by: Prenom Nom <e-mail@example.com>
, - dans la quatrième ligne, référence au ticket de Porphyry (ex :
Check Hypertopic/Porphyry#501 for more details
).
@benel |
@benel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci @sarah-ngn @lildelfino !
On y est presque !
Vous trouverez dans les commentaires ligne à ligne quelques dernières demandes de modification.
Une fois que c'est fait, merci de tout remettre dans un seul commit sous la forme indiquée précédemment dans la discussion.
Ça va aller ?
'<title>' + row.doc.item_name + '</title>', | ||
'<description> Lieu : ' + row.doc.spatial + ' Créé le : ' + row.doc.created + ' Catégorie(s) : ' + topic + '</description>', | ||
'<link>' + uri + '/item/' + row.doc.item_corpus + '/' + row.id + '</link>', | ||
'<guid>Modifié le : ' + row.doc.record.modified + '</guid>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Même si ça devrait marcher, c'est un peu bizarre de mettre une phrase (en français qui plus est ) comme identifiant.
Par contre, vous avez raison @sarah-ngn, le moment précis de la modification est un bon candidat pour identifier l'évènement.
'Content-Type': 'text/xml' | ||
} | ||
}); | ||
uri = req.query.app; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attention la variable n'est pas déclarée. Même si ça fonctionne, ça peut causer des effets de bord.
send(uri); | ||
send('</link><description>Created or updated items.</description>'); | ||
while(row = getRow()){ | ||
var i=0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il est souvent conseillé de mettre un espace de chaque côté du =
.
send('</link><description>Created or updated items.</description>'); | ||
while(row = getRow()){ | ||
var i=0; | ||
var topic=""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il est souvent conseillé de mettre un espace de chaque côté du =
.
var i=0; | ||
var topic=""; | ||
for (var t in row.doc.topics){ | ||
topic+=t+", "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il est souvent conseillé de mettre un espace de chaque côté du +=
et du +
.
"from": ":object/:resource", | ||
"to": "../../:object/:resource" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attention, vous avez dû modifier quelque chose dans l'indendation (peut-être est-ce à cause de l'éditeur que vous utilisez). Du coup, ça rend difficile de voir précisément ce que vous vouliez réellement modifier.
En plus des problèmes de lecture du diff
ça rend toutes les autres opérations de Git moins efficaces (merge
, revert
, blame
, bisect
...).
function (doc) { | ||
if (doc.item_corpus && doc.record.modified) { | ||
emit([doc.item_corpus, doc.record.modified]); | ||
if(doc.topics && doc.record.modified){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il est conseillé de mettre un espace après le if
ainsi que avant l'accolade.
FEATURE : Get notified on corpus changes.
Co-authored-by: Thomas Godard thomas.godard@utt.fr
Check Hypertopic/Porphyry#501 for more details
@benel