Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add org level milestones #31175

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

iminfinity
Copy link

#20203

org-mile.mp4

PR sponsored by Obmondo.com

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 30, 2024
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 30, 2024
@github-actions github-actions bot added modifies/translation modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/migrations modifies/js labels May 30, 2024
<div class="list-header">
{{template "repo/issue/search" .}}
<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 21 to 22


Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

<div class="divider"></div>
<div class="gt-text-right">
{{if .PageIsEditMilestone}}
<a class="ui primary basic button" href="{{.OrgLink}}/milestones">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<a class="ui primary basic button" href="{{.OrgLink}}/milestones">
<a class="ui basic button" href="{{.OrgLink}}/milestones">

Generally there should only be one primary button per button group

Comment on lines 10 to 13
<a class="ui primary basic button link-action" href data-url="{{$.Link}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}
</a>
{{else}}
<a class="ui red basic button link-action" href data-url="{{$.Link}}/close">{{ctx.Locale.Tr "repo.milestones.close"}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<a class="ui primary basic button link-action" href data-url="{{$.Link}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}
</a>
{{else}}
<a class="ui red basic button link-action" href data-url="{{$.Link}}/close">{{ctx.Locale.Tr "repo.milestones.close"}}
<a class="ui primary button link-action" href data-url="{{$.Link}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}
</a>
{{else}}
<a class="ui red button link-action" href data-url="{{$.Link}}/close">{{ctx.Locale.Tr "repo.milestones.close"}}

Likely this looks better.

<div role="main" aria-label="{{.Title}}" class="page-content organization milestone">
{{template "org/header" .}}
<div class="ui container">
<div class="gt-df">
Copy link
Member

Choose a reason for hiding this comment

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

These gt- classes no longer exist so this is surely broken, please migrate to Tailwind.css's tw- classes.

Copy link
Author

@iminfinity iminfinity May 30, 2024

Choose a reason for hiding this comment

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

this pr was created before the tailwind switch, i updated our gitea but forgot this pr, will fix this and all other lint issue

{{if .IsClosed}}
{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
{{else}}

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 55 to 57

{{template "repo/issue/filters" .}}

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{{template "repo/issue/filters" .}}
{{template "repo/issue/filters" .}}

@silverwind
Copy link
Member

silverwind commented May 30, 2024

This PR is coming from an org, so maintainers have no push permission to the source branch. Can this be allowed somehow? Would make things easier.

@iminfinity
Copy link
Author

iminfinity commented May 30, 2024

This PR is coming from an org, so maintainers have no push permission to the source branch. Can this be allowed somehow? Would make things easier.

i have no idea, let me ask someone

@KlavsKlavsen
Copy link

This PR is coming from an org, so maintainers have no push permission to the source branch. Can this be allowed somehow? Would make things easier.

So you want to push to "source branch" in source repo (the fork) ? that sounds very odd.. that would not work even if I forked it to my personal repo ? that sounds weird.. :)

If you know of any org settings for the org - I can change them though as I am org owner though.

@iminfinity will fix merge conflict and other things, so its good to merge right?

@KlavsKlavsen
Copy link

in this case - @iminfinity will have to update our fork of latest main and then re-apply/adjust his commits to work (and test ofcourse) - and then push the updated change so it matches

@silverwind
Copy link
Member

silverwind commented Jun 13, 2024

Maybe it'd be easier if you re-raise the PR from a user account so that we can push fixes onto this branch. I don't know why GitHub has this silly restriction to not allow collaboration on org branches.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 16, 2024

I could try to explain more: we encourage contributors to enable "Allow maintainers to edit" for their PRs, then maintainers could help to improve the code together and update&merge.

image

image


However, GitHub has a restriction: if a PR is from an org, then no maintainer could edit that PR. That's why the PRs from an org are difficult to review&improve.

If a PR is from a user's account and allows maintainers to edit, then some maintainers who have interests and experiences could work together to try to complete it.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 16, 2024

And one more thing, there are still many problems, for example: the db migration should use XORM sync, many CSS styles are no long available ("gt-mr-2" / "mr-2"), coding-style (use template {{}} instead of print), duplicate code (some code blocks are copied&pasted?), strange key/variable (orgPath), etc. And it's better to have some tests to cover the new logic.

Haven't really taken a look carefully, but I guess it's far from mature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/js modifies/migrations modifies/templates This PR modifies the template files modifies/translation size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants