This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed some bugs related to activities
Besides the mentioned issues, this commit also fixes some activities when deleting users. This commit also fixes most of the issues in #899, but since this wasn't the goal of this commit, fixing this issue has been left as something to be done in the near future (I'd still need to properly review it). Fixes #1104 Fixes #1106 See #899 Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
- Loading branch information
Showing
33 changed files
with
222 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= CSV.generate_line(['namespace', activity.trackable.name, 'change team', '-', activity.owner.username, activity.created_at, "owned by team #{activity.trackable.team.name}"]) | ||
= CSV.generate_line(['namespace', activity.trackable.name, 'change team', '-', activity.owner.username, activity.created_at, "owned by team #{activity_team(activity, true)}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= CSV.generate_line(['namespace', activity.trackable.name, 'create', '-', activity_owner(activity), activity.created_at, "owned by team #{activity.trackable.team.name}"]) | ||
= CSV.generate_line(['namespace', activity.trackable.name, 'create', '-', activity_owner(activity), activity.created_at, "owned by team #{activity_team(activity, true)}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- if activity.parameters[:repository_name] | ||
= CSV.generate_line(['repository', "#{activity.trackable.clean_name}", 'delete repository', "#{activity.parameters[:repository_name]}", activity_owner(activity), activity.created_at, "-"]) | ||
- else | ||
= CSV.generate_line(['repository', "#{activity.trackable.clean_name}", 'delete repository', "-", activity_owner(activity), activity.created_at, "-"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
= CSV.generate_line(['team', activity.trackable.name, 'add member', activity.recipient.display_username, activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) | ||
- if activity.recipient | ||
= CSV.generate_line(['team', activity_team(activity), 'add member', activity.recipient.display_username, activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) | ||
- elsif activity.parameters[:team_user] | ||
= CSV.generate_line(['team', activity_team(activity), 'add member', activity.parameters[:team_user], activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) | ||
- else | ||
= CSV.generate_line(['team', activity_team(activity), 'add member', "a user", activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
= CSV.generate_line(['team', | ||
activity.trackable.name, | ||
'change member role', | ||
activity.recipient.display_username, | ||
activity_owner(activity), | ||
activity.created_at, | ||
"from #{activity.parameters[:old_role]} to \ | ||
#{activity.parameters[:new_role]}"]) | ||
= CSV.generate_line(['team', activity_team(activity), 'change member role', activity_user_recipient(activity, :team_user), activity_owner(activity), activity.created_at, "from #{activity.parameters[:old_role]} to #{activity.parameters[:new_role]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
app/views/public_activity/team/_change_team_description.csv.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
= CSV.generate_line(['team', | ||
activity.trackable.name, | ||
'change the description of the team', | ||
activity.recipient.name, | ||
activity_owner(activity), | ||
activity.created_at, | ||
"from #{activity.parameters[:old_description]} to \ | ||
#{activity.parameters[:new_description]}"]) | ||
= CSV.generate_line(['team', activity_team(activity), 'change the description of the team', activity.recipient.name, activity_owner(activity), activity.created_at, "from #{activity.parameters[:old_description]} to #{activity.parameters[:new_description]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
= CSV.generate_line(['team', | ||
activity.trackable.name, | ||
'change the name of the team', | ||
activity.recipient.name, | ||
activity_owner(activity), | ||
activity.created_at, | ||
"from #{activity.parameters[:old_name]} to \ | ||
#{activity.parameters[:new_name]}"]) | ||
= CSV.generate_line(['team', activity_team(activity), 'change the name of the team', activity.recipient.name, activity_owner(activity), activity.created_at, "from #{activity.parameters[:old_name]} to #{activity.parameters[:new_name]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= CSV.generate_line(['team', activity.trackable.name, 'create', '-', activity_owner(activity), activity.created_at, '-']) | ||
= CSV.generate_line(['team', activity_team(activity), 'create', '-', activity_owner(activity), activity.created_at, '-']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= CSV.generate_line(['team', activity.trackable.name, 'remove member', activity.recipient.display_username, activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) | ||
= CSV.generate_line(['team', activity_team(activity), 'remove member', activity.recipient.display_username, activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= CSV.generate_line(['user', "-", 'removed user', activity.parameters[:username], activity_owner(activity), activity.created_at, "role #{activity.parameters[:role]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
- if activity.trackable | ||
= CSV.generate_line(['webhook', activity.trackable.url, 'create', '-', activity.owner.username, activity.created_at, "owned by namespace #{activity.trackable.namespace.name}"]) | ||
= CSV.generate_line(['webhook', activity.trackable.url, 'create', '-', activity_owner(activity), activity.created_at, "owned by namespace #{activity.trackable.namespace.name}"]) | ||
- else | ||
= CSV.generate_line(['webhook', activity.parameters[:webhook_host], 'create', '-', activity.owner.username, activity.created_at, "owned by namespace #{activity.parameters[:namespace_name]}"]) | ||
= CSV.generate_line(['webhook', activity.parameters[:webhook_host], 'create', '-', activity_owner(activity), activity.created_at, "owned by namespace #{activity.parameters[:namespace_name]}"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
= CSV.generate_line(["webhook", activity.parameters[:webhook_host], "destroy", "-", activity.owner.username, activity.created_at, "owned by namespace #{activity.parameters[:namespace_name]}"]) | ||
= CSV.generate_line(["webhook", activity.parameters[:webhook_host], "destroy", "-", activity_owner(activity), activity.created_at, "owned by namespace #{activity.parameters[:namespace_name]}"]) |
Oops, something went wrong.