File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 77        description : " The URL of the issue to update and close" 
88        required : true 
99        type : string 
10+       exercise-title :
11+         description : " The title of the exercise" 
12+         required : false 
13+         type : string 
1014      update-readme-with-congratulations :
1115        description : " Whether to update the README with a congratulations message" 
1216        required : false 
@@ -42,10 +46,18 @@ jobs:
4246      - name : Encode socials text 
4347        id : encode-socials-text 
4448        uses : actions/github-script@v7 
49+         env :
50+           EXERCISE_TITLE : ${{ inputs.exercise-title }} 
4551        with :
4652          script : | 
4753            const repoUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}`; 
48-             const socialsText = `I just completed a GitHub Skills exercise! 🎉 
54+             const exerciseTitle = process.env.EXERCISE_TITLE; 
55+ 
56+             const firstLine = exerciseTitle && exerciseTitle.trim() !== '' 
57+               ? `I just completed the "${exerciseTitle}" GitHub Skills hands-on exercise! 🎉` 
58+               : `I just completed a GitHub Skills hands-on exercise! 🎉`; 
59+ 
60+             const socialsText = `${firstLine} 
4961
5062            ${repoUrl} 
5163
97109          template-vars : | 
98110            login: ${{ github.actor }} 
99111            repo_full_name: ${{ github.repository }} 
100- 
101112name : Create comment - exercise finished 
102113        run : | 
103114          gh issue comment "${{ inputs.issue-url }}" \ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments