0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-18 21:40:08 +01:00
forgejo/models
Jason Song d81659d039
Respect original content when creating secrets ()
Fix .

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">
2023-05-16 14:49:40 +08:00
..
actions Don't filter action runs based on state () 2023-05-14 16:04:24 +00:00
activities Fix commits pushed with deploy keys not shown in dashboard () 2023-05-10 04:14:58 +00:00
admin Make repo migration cancelable and fix various bugs () 2023-05-11 08:25:46 +00:00
asymkey Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
auth Fix 500 error if there is a name conflict when edit authentication source () 2023-03-31 22:32:18 +08:00
avatars Avoid warning for system setting when start up () 2023-02-24 18:23:13 +08:00
db Improve milestone filter on issues page () 2023-04-30 09:12:49 -04:00
dbfs Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
fixtures fix: release page for empty or non-existing target () 2023-05-10 11:43:55 +08:00
git Add status indicator on main home screen for each repo () 2023-05-13 21:59:01 +00:00
issues Modify luminance calculation and extract related functions into single files () 2023-05-10 11:19:03 +00:00
migrations Rewrite queue () 2023-05-08 19:49:59 +08:00
organization Add owner team permission check test () 2023-04-19 19:19:13 -04:00
packages Add Go package registry () 2023-05-14 23:38:40 +08:00
perm Rename repo.GetOwner to repo.LoadOwner () 2023-02-18 20:11:03 +08:00
project Improve GetBoards and getDefaultBoard () 2023-04-09 22:07:23 +08:00
pull
repo Refactor Pull Mirror and fix out-of-sync bugs () 2023-05-15 19:02:10 +00:00
secret Respect original content when creating secrets () 2023-05-16 14:49:40 +08:00
shared/types Display owner of a runner as a tooltip instead of static text () 2023-05-12 08:43:27 +00:00
system Avoid warning for system setting when start up () 2023-02-24 18:23:13 +08:00
unit Require at least one unit to be enabled () 2023-05-06 17:39:06 +08:00
unittest Rewrite queue () 2023-05-08 19:49:59 +08:00
user Add Debian package registry () 2023-05-02 12:31:35 -04:00
webhook Fix incorrect webhook time and use relative-time to display it () 2023-05-03 19:53:43 -04:00
error.go
fixture_generation.go
fixture_test.go
main_test.go Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
migrate.go
migrate_test.go
org.go
org_team.go Remove org users who belong to no teams () 2023-04-24 15:52:38 -04:00
org_team_test.go
org_test.go
repo.go Split "modules/context.go" to separate files () 2023-05-08 17:36:54 +08:00
repo_collaboration.go
repo_collaboration_test.go Rename repo.GetOwner to repo.LoadOwner () 2023-02-18 20:11:03 +08:00
repo_test.go
repo_transfer.go Fix unclear IsRepositoryExist logic () 2023-04-28 14:14:26 -04:00
repo_transfer_test.go