Commit Graph
100 Commits
Author SHA1 Message Date
Jason Song 3b119f3d78 chore: npm install --package-lock-only 2022-11-25 22:27:34 +08:00
Jason Song 6af809d0bd chore: lint front 2022-11-25 22:27:34 +08:00
Jason Song 02fac6b5f0 Merge branch 'main' into feature/bots 2022-11-25 18:20:31 +08:00
Jason Song 378e1f8d01 chore: fix problems caused by rebase 2022-11-25 17:58:34 +08:00
Jason Song 295a7f68c8 feat: update job info 2022-11-25 17:48:48 +08:00
Jason Song 1886156329 chore: remove outdated todos 2022-11-25 17:48:48 +08:00
Jason Song 4814a6ad1b fix: fill more contexts 2022-11-25 17:48:48 +08:00
Jason Song fdd3c0434e feat: add IsForkPullRequest 2022-11-25 17:48:48 +08:00
Jason Song 6ad8bddabf feat: GetRunningTaskByToken 2022-11-25 17:48:48 +08:00
Jason Song e346581344 chore: update grpc router path 2022-11-25 17:48:48 +08:00
Jason Song 48f5c152b9 chore: mod tidy 2022-11-25 17:48:48 +08:00
Jason Song 96d9b729ee chore: upgrade act 2022-11-25 17:48:48 +08:00
Jason Song d17a0b13f1 chore: use bots-proto-go v0.1.0 2022-11-25 17:48:48 +08:00
Jason Song ea1bc1b662 chore: replace with code.gitea.io/bots-proto-go 2022-11-25 17:48:48 +08:00
Jason Song 736275f0b1 feat: support cancel button 2022-11-25 17:48:48 +08:00
Jason Song f3a9a25682 fix: remove build view header 2022-11-25 17:48:47 +08:00
Jason Song 5230c7a364 fix: remove debug log 2022-11-25 17:48:47 +08:00
Jason Song 0f5aab0c1a chore: remove Result from task and step 2022-11-25 17:48:47 +08:00
Jason Song dd417a3270 chore: move job emitter to service 2022-11-25 17:48:47 +08:00
Jason Song 7059cd7265 feat: update runner status 2022-11-25 17:48:47 +08:00
Jason Song 745be45e1b chore: rename to Init 2022-11-25 17:48:47 +08:00
Jason Song 9b021500b0 feat: ignore bots events of repo with disabled builds 2022-11-25 17:48:47 +08:00
Jason Song 717344007a chore: remove GetRunnerByToken 2022-11-25 17:48:47 +08:00
Jason Song 0682f0fcc5 chore: reduse log noise 2022-11-25 17:48:47 +08:00
Jason Song 7b2f1f5a91 chore: fix token format 2022-11-25 17:48:47 +08:00
Jason Song 140d57aecb feat: use runner token hash 2022-11-25 17:48:47 +08:00
Jason Song 94241daaaa feat: check runner token 2022-11-25 17:48:47 +08:00
Jason Song 9c6476754d chore: shouldn't import act_runner 2022-11-25 17:48:47 +08:00
Jason Song 1a55d39adc fix: ignore ErrAlreadyInQueue 2022-11-25 17:48:47 +08:00
Jason Song 5d83ffa658 chore: log updating task 2022-11-25 17:48:47 +08:00
Jason Song ce39e45cc2 chore: reduce log noise 2022-11-25 17:48:47 +08:00
Jason Song a1ddfb8200 feat: use new FullSteps 2022-11-25 17:48:47 +08:00
Jason Song e19f2c8c44 chore: add ids to task 2022-11-25 17:48:47 +08:00
Jason Song 381d06729b fix: repository in context 2022-11-25 17:48:47 +08:00
Jason Song 706aed2ba6 fix: update color of rerun button 2022-11-25 17:48:47 +08:00
Jason Song 5e7adf2004 chore: add extra fields to Run and RunJob 2022-11-25 17:48:47 +08:00
Jason Song cab3fc072a fix: use updated to check abandoned jobs 2022-11-25 17:48:47 +08:00
Jason Song 0b62e1da74 feat: rerun jobs 2022-11-25 17:48:47 +08:00
Jason Song 8a8214113b fix: use subtle compare 2022-11-25 17:48:47 +08:00
Jason Song 0e74431229 feat: get task by token 2022-11-25 17:48:47 +08:00
Jason Song 64eb15b73c fix: show block icon 2022-11-25 17:48:47 +08:00
Jason Song 465c348922 fix: show blocked jobs 2022-11-25 17:48:47 +08:00
Jason Song dc7e64041a feat: use job emitter 2022-11-25 17:48:47 +08:00
Jason Song cf40dca0c4 feat: record job needs 2022-11-25 17:48:46 +08:00
Jason Song 234cdc67e1 fix: run's status should failure with canceled jobs 2022-11-25 17:48:46 +08:00
Jason Song 9da6b9f92d feat: cancel abandoned jobs 2022-11-25 17:48:46 +08:00
Jason Song 83bb244a2c fix: update step status when stoping 2022-11-25 17:48:46 +08:00
Jason Song 705aaf3eb2 feat: stop zombie and endless tasks 2022-11-25 17:48:46 +08:00
Jason Song b1da53286d feat: show step duration 2022-11-25 17:48:46 +08:00
Jason Song b4b22e78ad feat: generate token for task 2022-11-25 17:48:46 +08:00
Jason Song 30df383ca0 feat: fix Ln number 2022-11-25 17:48:46 +08:00
Jason Song 3c7fce0d37 fix: distribute log files to folders 2022-11-25 17:48:46 +08:00
Jason Song e28c95ea5c feat: load secrets in task response 2022-11-25 17:48:46 +08:00
Jason Song 964f67e189 chore: remove unique index of runner name 2022-11-25 17:48:46 +08:00
Jason Song 04634b9143 feat: pick jobs of the runner only 2022-11-25 17:48:46 +08:00
Jason Song ec673c0e79 fix: avoid assigning job to multiple runners 2022-11-25 17:48:46 +08:00
Jason Song 9647989d99 fix: update nums when update runs 2022-11-25 17:48:46 +08:00
Jason Song 6531738b2e fix: builds UI 2022-11-25 17:48:46 +08:00
Jason Song dee4f2470b feat: inner build view UI 2022-11-25 17:48:46 +08:00
Jason Song d6e100f6be fix: update run status 2022-11-25 17:48:46 +08:00
Jason Song 3d4d44dadf fix: use index of run 2022-11-25 17:48:46 +08:00
Jason Song 9292e9ebdb fix: add methods of status 2022-11-25 17:48:46 +08:00
Jason Song dca2ca2f47 fix: remove usage of core 2022-11-25 17:48:46 +08:00
Jason Song 6cdbf3e986 fix: use new Status 2022-11-25 17:48:46 +08:00
Jason Song c756f3081d chore: remove /core 2022-11-25 17:48:45 +08:00
Jason Song feab4b1601 feat: update task status 2022-11-25 17:48:45 +08:00
Jason Song a8f74d4ec8 fix: make run index group by repo id only 2022-11-25 17:48:45 +08:00
Jason Song 7c40b1ee8d fix: log index of last step 2022-11-25 17:48:45 +08:00
Jason Song dcc552011e fix: right log index out of steps 2022-11-25 17:48:45 +08:00
Jason Song be1ced34be fix: log time format 2022-11-25 17:48:45 +08:00
Jason Song 8dbe30dff9 feat: tranfer log to storage 2022-11-25 17:48:45 +08:00
Jason Song d2f8d5ded1 fix: use file name for log 2022-11-25 17:48:45 +08:00
Jason Song 62798f67c8 fix: limit log line size 2022-11-25 17:48:45 +08:00
Jason Song dd5b2c5dfd feat: optimize log indexes 2022-11-25 17:48:45 +08:00
Jason Song bb4963fd4a fix: log file open flags 2022-11-25 17:48:45 +08:00
Jason Song c42577642d fix: seek write of dbfs 2022-11-25 17:48:45 +08:00
Jason Song 15db111df1 fix: avoid multiplue fetching 2022-11-25 17:48:45 +08:00
Jason Song d7b99e0028 feat: use dbfs to store log 2022-11-25 17:48:45 +08:00
Jason Song 1cba52376a feat: use run id and job id in page view 2022-11-25 17:48:45 +08:00
Jason Song d320eb66f4 feat: fetch job data 2022-11-25 17:48:45 +08:00
Jason Song 027d748fe2 feat: api for fetch job state 2022-11-25 17:48:45 +08:00
Jason Song 7be1d90a5a fix: ack right index 2022-11-25 17:48:45 +08:00
Jason Song 848a1ae309 feat: receive task logs 2022-11-25 17:48:45 +08:00
Jason Song 7497155d14 feat: update step state 2022-11-25 17:48:45 +08:00
Jason Song 6df53243aa feat: create task steps 2022-11-25 17:48:45 +08:00
Jason Song 32a5797608 chore: debug runner log reporting 2022-11-25 17:48:44 +08:00
Jason Song 79966763c6 feat: distribute tasks to runner 2022-11-25 17:48:44 +08:00
Jason Song 530faf7227 feat: assign task to runner 2022-11-25 17:48:44 +08:00
Jason Song e21c07cc55 feat: parse runner from ctx 2022-11-25 17:48:44 +08:00
Jason Song f355188e12 feat: parse workflows 2022-11-25 17:48:44 +08:00
Jason Song 91bea969d4 chore: replace act 2022-11-25 17:48:44 +08:00
Jason Song 905bce6cb6 feat: models for runner task 2022-11-25 17:48:44 +08:00
Jason Song 5093d6b48e chore: fix mods 2022-11-25 17:48:44 +08:00
Jason Song 702f4b521e Add index for access_token (#21908)
The `token_last_eight` field has been used in `GetAccessTokenBySHA `:
2022-11-23 20:49:41 -06:00
Jason Song e4eaa68a2b Replace yaml.v2 with yaml.v3 (#21832)
I don't see why we have to use two versions of yaml. The difference
between the two versions has nothing to do with our usage.
2022-11-21 16:36:59 +08:00
Jason Song d3f850cc0e Support comma-delimited string as labels in issue template (#21831)
The [labels in issue YAML
templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax)
can be a string array or a comma-delimited string, so a single string
should be valid labels.

The old codes committed in #20987 ignore this, that's why the warning is
displayed:

<img width="618" alt="image"
src="https://user-images.githubusercontent.com/9418365/202112642-93dc72d0-71c3-40a2-9720-30fc2d48c97c.png">

Fixes #17877.
2022-11-19 15:22:15 +00:00
Jason Song 92dd24716d Ignore issue template with a special name (#21830)
A file in `ISSUE_TEMPLATE` with the name `config.yml` shouldn't be
treated as a YAML template, it's for [configuring the template
chooser](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser).

The old code tried to ignore the file, but it didn't work, caused by
#20987. That's why the warning is displayed:

<img width="415" alt="image"
src="https://user-images.githubusercontent.com/9418365/202094067-804c42fe-0e9e-4fc5-bf01-d95fa336f54f.png">

Note that this PR is not an implementation of `config.yml`, there will
be another one to do it.
2022-11-16 19:14:58 +08:00
bf2078640f Load GitRepo in API before deleting issue (#21720)
Fix #20921.

The `ctx.Repo.GitRepo` has been used in deleting issues when the issue
is a PR.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-11-12 08:32:04 +08:00
50dd32ede4 Update message of reach_limit_of_creation (#21757)
When I'm trying to use a user which has no repo numbers limit to create
a repo for a org which has reached the limit, it says "You have already
reached your limit of 5 repositories."

That's confusing. "I" haven't reached the limit, the owner has.

<img width="828" alt="xnip_2022-11-10_11-57-45"
src="https://user-images.githubusercontent.com/9418365/200997290-d0819e40-fb10-4c37-917c-167e2070b4f9.png">

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-11-11 17:19:12 +08:00
1d22911cfe Extract updateSession function to reduce repetition (#21735)
A simple refactor to reduce duplicate codes.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
2022-11-10 19:43:06 +08:00