44 workflow_call :
55 inputs :
66 exercise-title :
7- description : ' Title of the exercise'
7+ description : " Title of the exercise"
88 required : true
99 type : string
1010 issue-title-prefix :
11- description : ' Prefix for the exercise title in the issue'
11+ description : " Prefix for the exercise title in the issue"
1212 required : false
1313 type : string
14- default : ' Exercise: '
14+ default : " Exercise: "
1515 intro-message :
16- description : ' Introduction message for the exercise'
16+ description : " Introduction message for the exercise"
1717 required : true
1818 type : string
1919 outputs :
2020 issue-url :
21- description : ' URL of the created issue'
21+ description : " URL of the created issue"
2222 value : ${{ jobs.create_exercise.outputs.issue-url }}
2323 issue-number :
24- description : ' Number of the created issue'
24+ description : " Number of the created issue"
2525 value : ${{ jobs.create_exercise.outputs.issue-number }}
2626
2727permissions :
@@ -30,7 +30,7 @@ permissions:
3030 issues : write # Create issue
3131
3232env :
33- EXERCISE_TOOLKIT_REF : 82efbc3de835a2b67d315833bb2f876ae9b4e07a
33+ EXERCISE_TOOLKIT_REF : 0b0154a6a164ddb582dcad16aa928b507af0b69f
3434
3535jobs :
3636 disable_workflows :
5252 env :
5353 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5454
55-
5655 create_exercise :
5756 name : Create exercise issue
5857 runs-on : ubuntu-latest
6968 path : exercise-toolkit
7069 ref : ${{ env.EXERCISE_TOOLKIT_REF }}
7170
71+ - name : Get template repository
72+ id : get-template-repo
73+ uses : actions/github-script@v8
74+ with :
75+ script : |
76+ const { data: repo } = await github.rest.repos.get({
77+ owner: context.repo.owner,
78+ repo: context.repo.repo
79+ });
80+
81+ if (repo.template_repository) {
82+ console.log(`Template repository found: ${repo.template_repository.full_name}`);
83+ const issueReportUrl = `https://github.com/${repo.template_repository.full_name}/issues`;
84+ core.setOutput('ISSUE_REPORT_URL', issueReportUrl);
85+ } else {
86+ console.log('No template repository found for this repository');
87+ }
88+
7289 - name : Build welcome message from template
7390 id : build-issue-description
7491 uses : skills/action-text-variables@v3
7895 title: ${{ inputs.exercise-title }}
7996 login: ${{ github.actor }}
8097 intro_message: ${{ inputs.intro-message }}
98+ bug_report_url: ${{ steps.get-template-repo.outputs.ISSUE_REPORT_URL || '' }}
8199
82100 - name : Create issue - add welcome message
83101 id : create-issue
0 commit comments