anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: packit/ogr
Issue: AttributeError:  'GithubPRComment' object has no attribute '_body'

Any ideas how [this](https://sentry.io/organizations/red-hat-0p/issues/1369231585) could have happen?

```python
AttributeError: 'GithubPRComment' object has no attribute '_body'
  File "packit_service/worker/tasks.py", line 42, in process_message
    return SteveJobs().process_message(event=event, topic=topic)
  File "packit_service/worker/jobs.py", line 249, in process_message
    jobs_results[job_type] = handler.run_n_clean()
  File "packit_service/worker/handler.py", line 177, in run_n_clean
    return self.run()
  File "packit_service/worker/fedmsg_handlers.py", line 221, in run
    if not self.was_last_build_successful():
  File "packit_service/worker/fedmsg_handlers.py", line 189, in was_last_build_successful
    if "Congratulations!" in comment.comment:
  File "ogr/abstract.py", line 78, in comment
    return self._body
```

Changed files:
ogr/abstract.py

diff --git a/ogr/abstract.py b/ogr/abstract.py
index df41293..7279164 100644
--- a/ogr/abstract.py
+++ b/ogr/abstract.py
@@ -75,7 +75,7 @@ class Comment:
             "Using deprecated property, that will be removed in 0.14.0"
             " (or 1.0.0 if it comes sooner). Please use body. "
         )
-        return self._body
+        return self.body
 
     @property
     def body(self) -> str:
Repository: packit/ogr
Issue: AttributeError: when repo_url.is_fork called as repo_url can return NoneType

https://github.com/packit/ogr/blob/c6bf9ae008047d5aa58fcabf2ec82ab651cd3a58/ogr/services/pagure/service.py#L101

https://github.com/packit/ogr/blob/c6bf9ae008047d5aa58fcabf2ec82ab651cd3a58/ogr/parsing.py#L202
"parse_git_repo" function's return value is returned to repo_url variable which is used by "get_project_from_url" function, however "parse_git_repo" function can return NoneType causing AttributeError

Changed files:
ogr/services/pagure/service.py

diff --git a/ogr/services/pagure/service.py b/ogr/services/pagure/service.py
index f9a55bd..ccc9304 100644
--- a/ogr/services/pagure/service.py
+++ b/ogr/services/pagure/service.py
@@ -100,6 +100,9 @@ class PagureService(BaseGitService):
 
     def get_project_from_url(self, url: str) -> "PagureProject":
         repo_url = parse_git_repo(potential_url=url)
+        if not repo_url:
+            raise OgrException(f"Cannot parse project url: '{url}'")
+
         if not repo_url.is_fork:
             repo_url.username = None
Repository: packit/ogr
Issue: the url in an issue object is the API url

Just checking to see what is the desired behavior. I create an issue and then print the url from the created issue. I'd then like to open that url in a web browser and have it go to the graphical UI and not the API.

For example:

```
>>> i = project.create_issue('TestIssue', 'foo bar baz')
>>> print(i.url)
https://pagure.io/api/0/dusty/failed-composes/issue/2244
```

But what I really want is the url to the web frontent. So `i.url.replace('api/0/','')`. What is the intended behavior? 

Changed files:
ogr/services/pagure.py

diff --git a/ogr/services/pagure.py b/ogr/services/pagure.py
index b1487e9..2d712f5 100644
--- a/ogr/services/pagure.py
+++ b/ogr/services/pagure.py
@@ -658,7 +658,9 @@ class PagureProject(BaseGitProject):
             title=issue_dict["title"],
             id=issue_dict["id"],
             status=IssueStatus[issue_dict["status"].lower()],
-            url=self._get_project_url("issue", str(issue_dict["id"])),
+            url=self._get_project_url(
+                "issue", str(issue_dict["id"]), add_api_endpoint_part=False
+            ),
             description=issue_dict["content"],
             author=issue_dict["user"]["name"],
             created=datetime.datetime.fromtimestamp(int(issue_dict["date_created"])),
Repository: packit/ogr
Issue: get_file_content: catch only 404, raise everything else

Just spent some time debugging an issue where packit.yaml was not found while being 100 % it's in there.

It turned out that my token was incorrect and github kept throwing 401: that should bubble up, we should catch 404 only. 

Changed files:
ogr/services/github.py

diff --git a/ogr/services/github.py b/ogr/services/github.py
index cfbecf1..34625ae 100644
--- a/ogr/services/github.py
+++ b/ogr/services/github.py
@@ -453,7 +453,7 @@ class GithubProject(BaseGitProject):
             return self.github_repo.get_contents(
                 path=path, ref=ref
             ).decoded_content.decode()
-        except Exception as ex:
+        except UnknownObjectException as ex:
             raise FileNotFoundError(f"File '{path}' on {ref} not found", ex)
 
     @staticmethod