This small PR changes the webhook trigger behaviour to be more in line with what's expected. (When 'repository' events are enabled, of course)
In other words:
For system-wide or default webhooks, repository events will now trigger said webhook. Previously it had to be under an organization for create events to be visible - a tad unexpected!
Deleting a repository will now fire its own defined webhooks, not just organisational and system ones.
In order to enable the latter the webhook has to now be triggered before the actual repo undergoes deletion. I'm willing to tweak this to try and 'grab' the webhook model beforehand and trigger the webhook notifier directly afterwards, but this may make the code more complex for little benefit.
Closes#11766, #9180.
* Add field with isIssueWriter to front end
* Make branch field editable
* Switch frontend to form and POST from javascript
* Add /issue/id/ref endpoint to routes
* Use UpdateIssueTitle model to change ref in backend
* Removed crossreference check and adding comments on branch change
* Use ref returned from POST to update the field
* Prevent calling loadRepo from models/
* Branch/tag refreshed without page reload
* Remove filter for empty branch name
* Add clear option to tag list as well
* Delete button translation and coloring
* Fix for not showing selected branch name in new issue
* Check that branch is not being changed on a PR
* Change logic
* Notification when changing issue ref
* Fix for renamed permission parameter
* Fix for failing build
* Apply suggestions from code review
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Gitea <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* add request review feature in pull request
add a way to notify specific reviewers to review like github , by add or delet a special type
review . The acton is is similar to Assign , so many code reuse the function and items of
Assignee, but the meaning and result is different.
The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.
The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.
The offical Review Request will block merge if Reject can block it.
an other change: add ui otify for Assignees.
Co-authored-by: guillep2k <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Signed-off-by: a1012112796 <[email protected]>
* new change
* add placeholder string
* do some changes follow #10238 to add review requests num on lists also
change icon for review requests to eye
Co-authored-by: Lauris BH <[email protected]>
* Implementation for calculating language statistics
Impement saving code language statistics to database
Implement rendering langauge stats
Add primary laguage to show in repository list
Implement repository stats indexer queue
Add indexer test
Refactor to use queue module
* Do not timeout for queues
* Move push commits from models to modules/repository
* fix test
* fix test
* fix test
* fix test
* fix test
Co-authored-by: zeripath <[email protected]>
* Some more e-mail notification fixes
A few more small e-mail notification fixes/changes
* Style footer of notification email to be smaller
* Include text for when pull request is merged
* Don't include original body of issue or PR when merging/closing by
setting issue.Content to "" in these cases
* Set Re: prefix and meessage-ID headers based on actName instead of checking for a
comment. This fixes a bug where certain actions that didn't have a
comment were setting Message-ID instead of In-Reply-To which caused some
mail programs not to show those messages as they would have had the same
Message-ID as a previous message. Also fixes the case where a final
comment and closing message would have been displayed out of order if
you didn't have a copy of the original issue/pr cretion message.
* Update other template footers for consistency
* Add ActionCommentPull action
Adds ActionCommentPull action to distinguish between a comment on an
issue and on a pull request
* Update modules/notification/action/action.go
Co-authored-by: Lunny Xiao <[email protected]>
* Adds functionality to change target branch of created pull requests
Signed-off-by: Mario Lubenka <[email protected]>
* Use const instead of var in JavaScript additions
Signed-off-by: Mario Lubenka <[email protected]>
* Check if branches are equal and if PR already exists before changing target branch
Signed-off-by: Mario Lubenka <[email protected]>
* Make sure to check all commits
Signed-off-by: Mario Lubenka <[email protected]>
* Print error messages for user as error flash message
Signed-off-by: Mario Lubenka <[email protected]>
* Disallow changing target branch of closed or merged pull requests
Signed-off-by: Mario Lubenka <[email protected]>
* Resolve conflicts after merge of upstream/master
Signed-off-by: Mario Lubenka <[email protected]>
* Change order of branch select fields
Signed-off-by: Mario Lubenka <[email protected]>
* Removes duplicate check
Signed-off-by: Mario Lubenka <[email protected]>
* Use ctx.Tr for translations
Signed-off-by: Mario Lubenka <[email protected]>
* Recompile JS
Signed-off-by: Mario Lubenka <[email protected]>
* Use correct translation namespace
Signed-off-by: Mario Lubenka <[email protected]>
* Remove redundant if condition
Signed-off-by: Mario Lubenka <[email protected]>
* Moves most change branch logic into pull service
Signed-off-by: Mario Lubenka <[email protected]>
* Completes comment
Signed-off-by: Mario Lubenka <[email protected]>
* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct
Signed-off-by: Mario Lubenka <[email protected]>
* Revert changes to go.mod
Signed-off-by: Mario Lubenka <[email protected]>
* Directly use createComment method
Signed-off-by: Mario Lubenka <[email protected]>
* Return 404 if pull request is not found. Move written check up
Signed-off-by: Mario Lubenka <[email protected]>
* Remove variable declaration
Signed-off-by: Mario Lubenka <[email protected]>
* Return client errors on change pull request target errors
Signed-off-by: Mario Lubenka <[email protected]>
* Return error in commit.HasPreviousCommit
Signed-off-by: Mario Lubenka <[email protected]>
* Adds blank line
Signed-off-by: Mario Lubenka <[email protected]>
* Test patch before persisting new target branch
Signed-off-by: Mario Lubenka <[email protected]>
* Update patch before testing (not working)
Signed-off-by: Mario Lubenka <[email protected]>
* Removes patch calls when changeing pull request target
Signed-off-by: Mario Lubenka <[email protected]>
* Removes unneeded check for base name
Signed-off-by: Mario Lubenka <[email protected]>
* Moves ChangeTargetBranch completely to pull service. Update patch status.
Signed-off-by: Mario Lubenka <[email protected]>
* Set webhook mode after errors were validated
Signed-off-by: Mario Lubenka <[email protected]>
* Update PR in one transaction
Signed-off-by: Mario Lubenka <[email protected]>
* Move logic for check if head is equal with branch to pull model
Signed-off-by: Mario Lubenka <[email protected]>
* Adds missing comment and simplify return
Signed-off-by: Mario Lubenka <[email protected]>
* Adjust CreateComment method call
Signed-off-by: Mario Lubenka <[email protected]>
* move transfer repository and rename repository on a service package and start action notification
* remove unused codes
* fix lint
* fix bugs
* fix test
* fix test
* fix test
* fix lint
* update go mod and sum
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes#7947