Skip to content

Commit 861dc89

Browse files
authored
chore: no need for template
1 parent fdaf5c8 commit 861dc89

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

action.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ inputs:
1919
replace_marker:
2020
description: 'Marker in Markdown file to identify where to replace the permalink'
2121
required: true
22-
permalink_template:
23-
description: 'Template for the permalink'
24-
required: true
2522
outputs:
2623
permalink:
2724
description: 'The generated permalink'
@@ -46,13 +43,7 @@ runs:
4643
exit 1
4744
fi
4845
49-
REPO=$(echo $GITHUB_REPOSITORY)
50-
PERMALINK=$(echo "${{ inputs.permalink_template }}" |
51-
sed "s|{{REPO}}|$REPO|g" |
52-
sed "s|{{COMMIT_ID}}|${{ steps.get-commit.outputs.commit_id }}|g" |
53-
sed "s|{{FILE_PATH}}|${{ inputs.snippet_file }}|g" |
54-
sed "s|{{START_LINE}}|$START_LINE|g" |
55-
sed "s|{{END_LINE}}|$END_LINE|g")
46+
PERMALINK="https://github.com/${GITHUB_REPOSITORY}/blob/${{ steps.get-commit.outputs.commit_id }}/${{ inputs.snippet_file }}#L${START_LINE}-L${END_LINE}"
5647
5748
echo "permalink=$PERMALINK" >> $GITHUB_OUTPUT
5849

0 commit comments

Comments
 (0)