jaywcjlove / jaywcjlove/github-action-modify-file-content

Is there a way to replace and remove the delimiters

Open
#19 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hi thanks for your great work. I have things working but its awkward when we have lots of tokens. But as the code replaces within the delimiters and still leaves the delimiters in the destination file, things get messy when trying to update a document

Do you think you could just support a direct string replacement eg `sed s/!!image!!/value/gp` kind of construct. At the moment I have to be very careful with the tokens used and they need to match the code language and obviously leaving the start/end tokens in the file is not very good when editing documents..

Ideally ..
```
body: myimage:123
token: !!image!!
```

Currenty I have this and its ok for yaml as long as i use comments etc
```
##start_image>
image: xxx
##end_image
```
which leaves me with this file..
```
##start_image>
image: myimage:123
##end_image
```

But it would be much nicer to say
```
image: !!image!!
something: !!another!!
```
And have the result as `image: 123` and `something:abc`

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name any files, tests, or entry points. Start by locating the current delimiter-based replacement logic and trace how token values are written to the destination file. Done should support direct token replacement such as !!image!! and remove the token markers from the resulting content, with coverage for multiple tokens and the YAML examples described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.