Skip to content

Move jobparser from act repository to Gitea#36699

Merged
lunny merged 10 commits intogo-gitea:mainfrom
lunny:lunny/move_jobparser
Feb 22, 2026
Merged

Move jobparser from act repository to Gitea#36699
lunny merged 10 commits intogo-gitea:mainfrom
lunny:lunny/move_jobparser

Conversation

@lunny
Copy link
Copy Markdown
Member

@lunny lunny commented Feb 21, 2026

The jobparser sub package in act is only used by Gitea. Move it to Gitea to make it more easier to maintain.

@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 21, 2026
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2026
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/dependencies labels Feb 21, 2026
@lunny lunny marked this pull request as draft February 22, 2026 06:27
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Feb 22, 2026

Good call moving this here imho.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 22, 2026
@silverwind
Copy link
Copy Markdown
Member

CI failures are related.

@ChristopherHX ChristopherHX self-requested a review February 22, 2026 10:35
@ChristopherHX
Copy link
Copy Markdown
Contributor

Looks like a regression in this code snipped, is this due to me switching to yaml.v4...

singleWorkflow := &jobparser.SingleWorkflow{}
if err := yaml.Unmarshal(content, singleWorkflow); err != nil {
return fmt.Errorf("failed to unmarshal workflow content: %w", err)
}
// get inputs from post
workflow := &model.Workflow{
RawOn: singleWorkflow.RawOn,
}
inputsWithDefaults := make(map[string]any)
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
if err = processInputs(workflowDispatch, inputsWithDefaults); err != nil {
return err
}
}

Needs investigation, in worst case revert to yaml v3.

@wxiaoguang
Copy link
Copy Markdown
Contributor

The jobparser sub package in act is only used by Gitea. Move it to Gitea to make it more easier to maintain.

If "jobparser" is only used in Gitea, should upstream delete this package first?

@TheFox0x7
Copy link
Copy Markdown
Contributor

If "jobparser" is only used in Gitea, should upstream delete this package first?

https://gitea.com/gitea/act/pulls/155

@wxiaoguang
Copy link
Copy Markdown
Contributor

And one more question: should we remove this "replace"? Just use "gitea.com/gitea/act" directly

replace github.com/nektos/act => gitea.com/gitea/act v0.261.8

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Feb 22, 2026

Yes please remove that replace directive. It just results in readers being confused which module is actually used. replace directives should all be eliminated imho.

@ChristopherHX
Copy link
Copy Markdown
Contributor

And one more question: should we remove this "replace"? Just use "gitea.com/gitea/act" directly

replace github.com/nektos/act => gitea.com/gitea/act v0.261.8

Then we would need a PR to gitea/act first to replace this in all modules, yes this makes sense for me as well.

This does not 100% look to be in scope of this PR.

(At least I think that we are forced to (one exception is the fork is of an executable, then go does not care), please correct me if I am wrong)

Copy link
Copy Markdown
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have preserved the original authors as coauthors, other than that this looks good now.

The ci failure

  • was unrelated to the yaml v4 version in go.mod
  • the problem was the model used yaml.Node v4 and the yaml.Unmarshal v3 (that left the yaml.Node v4 fields blank)

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 22, 2026
@wxiaoguang wxiaoguang marked this pull request as ready for review February 22, 2026 13:24
@silverwind silverwind added the topic/gitea-actions related to the actions of Gitea label Feb 22, 2026
@lunny
Copy link
Copy Markdown
Member Author

lunny commented Feb 22, 2026

I would have preserved the original authors as coauthors, other than that this looks good now.

The ci failure

  • was unrelated to the yaml v4 version in go.mod
  • the problem was the model used yaml.Node v4 and the yaml.Unmarshal v3 (that left the yaml.Node v4 fields blank)

This package was newly introduced by the Gitea maintainers specifically for Gitea. Therefore, the copyright holder “Gitea Authors” is appropriate.

Since the original files did not include a copyright year, I have added “2026” consistently to all of these files.

@ChristopherHX
Copy link
Copy Markdown
Contributor

Yes copyright is fine, I know

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
@lunny lunny enabled auto-merge (squash) February 22, 2026 19:03
@lunny lunny added this to the 1.26.0 milestone Feb 22, 2026
@lunny lunny merged commit ad98503 into go-gitea:main Feb 22, 2026
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 23, 2026
* giteaofficial/main: (81 commits)
  Add keyboard shortcuts for repository file and code search (go-gitea#36416)
  Refactor text utility classes to Tailwind CSS (go-gitea#36703)
  Prevent redirect bypasses via backslash-encoded paths (go-gitea#36660)
  Fix force push time-line commit comments of pull request (go-gitea#36653)
  Fix get release draft permission check (go-gitea#36659)
  Move `X_FRAME_OPTIONS` setting from `cors` to `security` section (go-gitea#30256)
  Update JS and PY deps (go-gitea#36708)
  Move jobparser from act repository to Gitea (go-gitea#36699)
  Fix push time bug (go-gitea#36693)
  Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" (go-gitea#36654)
  various fixes (go-gitea#36697)
  Add AI Contribution Policy to CONTRIBUTING.md (go-gitea#36651)
  Add some validation on values provided to USER_DISABLED_FEATURES and EXTERNAL_USER_DISABLED_FEATURES (go-gitea#36688)
  Rework e2e tests (go-gitea#36634)
  Remove unused functions (go-gitea#36672)
  Add migration http transport for push/sync mirror lfs (go-gitea#36665)
  Fix track time issue id (go-gitea#36664)
  Refactor inline style attributes (go-gitea#36652)
  Update Nix flake (go-gitea#36679)
  Upgrade gogit to 5.16.5 (go-gitea#36680)
  ...

# Conflicts:
#	web_src/js/features/repo-issue-content.ts
@lunny lunny deleted the lunny/move_jobparser branch March 28, 2026 04:54
lunny added a commit to lunny/gitea that referenced this pull request Mar 28, 2026
The jobparser sub package in act is only used by Gitea. Move it to Gitea
to make it more easier to maintain.

---------

Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/go Pull requests that update Go code modifies/internal topic/code-linting topic/gitea-actions related to the actions of Gitea type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants