You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/11/28 20:30:50 UTC

[allura] branch gc/8481 updated (0861c2008 -> 73ddd5484)

This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a change to branch gc/8481
in repository https://gitbox.apache.org/repos/asf/allura.git


 discard 0861c2008 fixup! [#8481] added two new attributes to provide more context in activity stream
 discard 5be2ff7a0 [#8481] added two new attributes to provide more context in activity stream
     new 73ddd5484 [#8481] added target attributes to repository activity

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0861c2008)
            \
             N -- N -- N   refs/heads/gc/8481 (73ddd5484)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Allura/allura/controllers/repository.py             | 2 +-
 Allura/allura/model/repo_refresh.py                 | 2 +-
 Allura/allura/tasks/repo_tasks.py                   | 2 +-
 ForgeActivity/forgeactivity/main.py                 | 3 ---
 ForgeActivity/forgeactivity/templates/timeline.html | 5 -----
 5 files changed, 3 insertions(+), 11 deletions(-)


[allura] 01/01: [#8481] added target attributes to repository activity

Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8481
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 73ddd54848ee067f3b2b6319d4c85e8e8df15aaf
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Nov 28 14:30:29 2022 -0600

    [#8481] added target attributes to repository activity
---
 Allura/allura/controllers/repository.py | 2 +-
 Allura/allura/model/repo_refresh.py     | 2 +-
 Allura/allura/tasks/repo_tasks.py       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index cb9cad866..3f9c68997 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -219,7 +219,7 @@ class RepoRootController(BaseController, FeedController):
             )
             session(t).flush()
             allura.tasks.notification_tasks.send_usermentions_notification.post(mr.index_id(), kw['description'])
-            g.director.create_activity(c.user, 'created', mr,
+            g.director.create_activity(c.user, 'created', mr, target=mr.app.repo,
                                        related_nodes=[c.project], tags=['merge-request'])
             redirect(mr.url())
 
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index da7d81651..232735c3d 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -93,7 +93,7 @@ def refresh_repo(repo, all_commits=False, notify=True, new_clone=False, commits_
                 g.statsUpdater.newCommit(new, repo.app_config.project, user)
             actor = user or TransientActor(
                     activity_name=new.committed.name or new.committed.email)
-            g.director.create_activity(actor, 'committed', new,
+            g.director.create_activity(actor, 'committed', new, target=repo,
                                        related_nodes=[repo.app_config.project],
                                        tags=['commit', repo.tool.lower()])
 
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 17f26788c..3eae80327 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -160,7 +160,7 @@ def merge(merge_request_id):
     mr.app.repo.merge(mr)
     mr.add_meta_post(changes={'Status': [mr.status, 'merged']})
     mr.status = 'merged'
-    g.director.create_activity(c.user, 'merged', mr,
+    g.director.create_activity(c.user, 'merged', mr, target=mr.app.repo,
                                related_nodes=[c.project], tags=['merge-request'])
     session(mr).flush(mr)