In fact we say that an intention is good, that is, right in itself, but that an action does not bear any good in itself but proceeds from a good intention. Whence when the same thing is done by the same man at different times, by the diversity of his intention, however, his action is now said to be good, now bad.
Bonam quippe intentionem, hoc est, rectam in se dicimus, operationem vero non quod boni aliquid in se suscipiat, sed quod ex bona intentione procedat. Unde et ab eodem homine cum in diversis temporibus idem fiat, pro diversitate tamen intentione eius operatio modo bono modo mala dicitur.
Peter Abelard (1079-1142) French philosopher, theologian, logician [Pierre Abélard]
Ethics [Ethica], Book 1 [tr. Luscombe (1971)]