Narrated Ibn `Abbas:

`Umar used to make me sit with the elderly men who had fought in the Battle of Badr. Some of them felt it (did not like that) and said to `Umar "Why do you bring in this boy to sit with us while we have sons like him?" `Umar replied, "Because of what you know of his position (i.e. his religious knowledge.)" One day `Umar called me and made me sit in the gathering of those people; and I think that he called me just to show them. (my religious knowledge). `Umar then asked them (in my presence). "What do you say about the interpretation of the Statement of Allah: 'When comes Help of Allah (to you O, Muhammad against your enemies) and the conquest (of Mecca).' (110.1) Some of them said, "We are ordered to praise Allah and ask for His forgiveness when Allah's Help and the conquest (of Mecca) comes to us." Some others kept quiet and did not say anything. On that, `Umar asked me, "Do you say the same, O Ibn `Abbas?" I replied, "No." He said, 'What do you say then?" I replied, "That is the sign of the death of Allah's Messenger (ﷺ) which Allah informed him of. Allah said:-- '(O Muhammad) When comes the Help of Allah (to you against your enemies) and the conquest (of Mecca) (which is the sign of your death). You should celebrate the praises of your Lord and ask for His Forgiveness, and He is the One Who accepts the repentance and forgives.' (110.3) On that `Umar said, "I do not know anything about it other than what you have said."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ أَبِي بِشْرٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كَانَ عُمَرُ يُدْخِلُنِي مَعَ أَشْيَاخِ بَدْرٍ، فَكَأَنَّ بَعْضَهُمْ وَجَدَ فِي نَفْسِهِ فَقَالَ لِمَ تُدْخِلُ هَذَا مَعَنَا وَلَنَا أَبْنَاءٌ مِثْلُهُ فَقَالَ عُمَرُ إِنَّهُ مِنْ حَيْثُ عَلِمْتُمْ‏.‏ فَدَعَا ذَاتَ يَوْمٍ ـ فَأَدْخَلَهُ مَعَهُمْ ـ فَمَا رُئِيتُ أَنَّهُ دَعَانِي يَوْمَئِذٍ إِلاَّ لِيُرِيَهُمْ‏.‏ قَالَ مَا تَقُولُونَ فِي قَوْلِ اللَّهِ تَعَالَى ‏{‏إِذَا جَاءَ نَصْرُ اللَّهِ وَالْفَتْحُ‏}‏ فَقَالَ بَعْضُهُمْ أُمِرْنَا نَحْمَدُ اللَّهَ وَنَسْتَغْفِرُهُ، إِذَا نُصِرْنَا وَفُتِحَ عَلَيْنَا‏.‏ وَسَكَتَ بَعْضُهُمْ فَلَمْ يَقُلْ شَيْئًا فَقَالَ لِي أَكَذَاكَ تَقُولُ يَا ابْنَ عَبَّاسٍ فَقُلْتُ لاَ‏.‏ قَالَ فَمَا تَقُولُ قُلْتُ هُوَ أَجَلُ رَسُولِ اللَّهِ صلى الله عليه وسلم أَعْلَمَهُ لَهُ، قَالَ ‏{‏إِذَا جَاءَ نَصْرُ اللَّهِ وَالْفَتْحُ‏}‏ وَذَلِكَ عَلاَمَةُ أَجَلِكَ ‏{‏فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ إِنَّهُ كَانَ تَوَّابًا‏}‏‏.‏ فَقَالَ عُمَرُ مَا أَعْلَمُ مِنْهَا إِلاَّ مَا تَقُولُ‏.‏
USC-MSA web (English) reference : Vol. 6, Book 60, Hadith 494
Arabic reference : Book 65, Hadith 4970