You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models
Jason Song d81659d039
Respect original content when creating secrets (#24745)
Fix #24721.

Follow what GitHub does:
- Don't trim spaces for secrets.
- Newline should be `\n` instead of `\r\n`.

Did some tests with:

```yaml
name: secrets
on: push
jobs:
  show_secrets:
    runs-on: ubuntu-latest
    steps:
      - name: Dump secrets context
        run: echo '${{ toJSON(secrets) }}' | base64
```

`AAAAAA`:
```text
   AAAAAA
AAAAAA


```
`BBBBBB`:
```text



BBBBBB
BBBBBB   
```


On GitHub:

<img width="675" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8">


On Gitea (before):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2">

On Gitea (after):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a">
1 year ago
..
actions Don't filter action runs based on state (#24711) 1 year ago
activities Fix commits pushed with deploy keys not shown in dashboard (#24521) 1 year ago
admin Make repo migration cancelable and fix various bugs (#24605) 1 year ago
asymkey Merge setting.InitXXX into one function with options (#24389) 1 year ago
auth Fix 500 error if there is a name conflict when edit authentication source (#23832) 1 year ago
avatars Avoid warning for system setting when start up (#23054) 1 year ago
db Improve milestone filter on issues page (#22423) 1 year ago
dbfs Merge setting.InitXXX into one function with options (#24389) 1 year ago
fixtures fix: release page for empty or non-existing target (#24470) 1 year ago
git Add status indicator on main home screen for each repo (#24638) 1 year ago
issues Modify luminance calculation and extract related functions into single files (#24586) 1 year ago
migrations Rewrite queue (#24505) 1 year ago
organization Add owner team permission check test (#24096) 1 year ago
packages Add Go package registry (#24687) 1 year ago
perm Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 1 year ago
project Improve GetBoards and getDefaultBoard (#22981) 1 year ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo Refactor Pull Mirror and fix out-of-sync bugs (#24732) 1 year ago
secret Respect original content when creating secrets (#24745) 1 year ago
shared/types Display owner of a runner as a tooltip instead of static text (#24377) 1 year ago
system Avoid warning for system setting when start up (#23054) 1 year ago
unit Require at least one unit to be enabled (#24189) 1 year ago
unittest Rewrite queue (#24505) 1 year ago
user Add Debian package registry (#24426) 1 year ago
webhook Fix incorrect webhook time and use relative-time to display it (#24477) 1 year ago
error.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Merge setting.InitXXX into one function with options (#24389) 1 year ago
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 2 years ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Remove org users who belong to no teams (#24247) 1 year ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Split "modules/context.go" to separate files (#24569) 1 year ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 1 year ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Fix unclear `IsRepositoryExist` logic (#24374) 1 year ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago