Skip to content

admin: provide links back to public job and revision pages (bug 2019494)#952

Closed
shtrom wants to merge 1 commit intomainfrom
bug2019488/admin-backlinks
Closed

admin: provide links back to public job and revision pages (bug 2019494)#952
shtrom wants to merge 1 commit intomainfrom
bug2019488/admin-backlinks

Conversation

@shtrom
Copy link
Member

@shtrom shtrom commented Feb 26, 2026

Original bug 2019488 (in landed commit) is incorrect, it should be bug 2019494.

@github-actions
Copy link

View this pull request in Lando to land it once approved.

@shtrom shtrom changed the base branch from main to bug2019496/dev-admin-profile-fix February 26, 2026 07:14
@shtrom shtrom changed the title Bug2019488/admin backlinks admin: provide links back to public job and revision pages (bug 2019488) Feb 26, 2026
@shtrom shtrom marked this pull request as ready for review February 26, 2026 07:14
@shtrom shtrom requested a review from a team as a code owner February 26, 2026 07:14
Comment on lines +260 to +265
def view_on_site(self, instance: Revision) -> str | None:
if not instance.revision_id:
return None
url = reverse("revisions-page", kwargs={"revision_id": instance.revision_id})
return url

Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well implement this for a pull request based revision?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we have a dedicated Lando page for those yet?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I had a look, and we could link it to the pull-request view via the pull_number on the Revision, but we also need a repo_name, which I think is only associated to the revision via a LandingJob, so I don't think we have enough information to link.

Can you think of another way to get it?

Copy link
Member Author

@shtrom shtrom Feb 27, 2026

Choose a reason for hiding this comment

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

It may actually make more sense to complete the model to have a pull_repo[_name], because a pull_number in isolation is a bit meaningless. We may also want to add a is_pull_request?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'm gonna land this as is, but we should follow up with adding support for PRs. Added a note here: https://bugzilla.mozilla.org/show_bug.cgi?id=2012875#c4

@shtrom shtrom force-pushed the bug2019488/admin-backlinks branch from b4bfab6 to acfb4ca Compare March 2, 2026 06:41
@shtrom shtrom changed the base branch from bug2019496/dev-admin-profile-fix to main March 2, 2026 06:49
@shtrom
Copy link
Member Author

shtrom commented Mar 2, 2026

dropped the admin profile commit from #951.

@lando-prod-mozilla
Copy link

Pull request closed by commit ecf3c3e

lando-prod-mozilla bot pushed a commit that referenced this pull request Mar 2, 2026
@shtrom shtrom changed the title admin: provide links back to public job and revision pages (bug 2019488) admin: provide links back to public job and revision pages (bug 2019494) Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants