# Tartışmalar ve Çekme İstekleriyle Etkileşim

Hub'da Pull Request ve Tartışmalarla etkileşimi sağlayan yöntemlerin referansı için [HfApi](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi) dokümantasyon sayfasını kontrol edin.

- [get_repo_discussions()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.get_repo_discussions)
- [get_discussion_details()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.get_discussion_details)
- [create_discussion()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.create_discussion)
- [create_pull_request()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.create_pull_request)
- [rename_discussion()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.rename_discussion)
- [comment_discussion()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.comment_discussion)
- [edit_discussion_comment()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.edit_discussion_comment)
- [change_discussion_status()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.change_discussion_status)
- [merge_pull_request()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.merge_pull_request)

## Veri yapıları[[huggingface_hub.Discussion]]

#### huggingface_hub.Discussion[[huggingface_hub.Discussion]]

```python
huggingface_hub.Discussion(title: str, status: typing.Literal['open', 'closed', 'merged', 'draft'], num: int, repo_id: str, repo_type: str, author: str, is_pull_request: bool, created_at: datetime, endpoint: str)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L20)

**Parametreler:**

title (`str`) : Tartışma / Birleştirme İsteği başlığı

status (`str`) : Tartışma / Çekme İsteğinin durumu. Aşağıdakilerden biri olmalıdır: * `"open"` * `"closed"` * `"merged"` (yalnızca Çekme İstekleri için) * `"draft"` (yalnızca Çekme İstekleri için)

num (`int`) : Tartışma / Birleştirme İsteğinin numarası.

repo_id (`str`) : Discussion / Pull Request'in açık olduğu repozituarın kimliği (`"{namespace}/{repo_name}"`).

repo_type (`str`) : Discussion / Pull Request'in açık olduğu repo'nun türü. Olası değerler: `"model"`, `"dataset"`, `"space"`.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

is_pull_request (`bool`) : Bu bir Pull Request olup olmadığı.

created_at (`datetime`) : Tartışma / Çekme İsteğinin oluşturulma `datetime` değeri.

endpoint (`str`) : Hub'un uç noktası. Varsayılan https://huggingface.co'dur.

git_reference (`str`, *isteğe bağlı*) : (property) Bu bir Pull Request ise değişikliklerin itilebileceği Git referansı, aksi halde `None`.

url (`str`) : (property) Hub'daki tartışmanın URL'si.

Hub'da bir Tartışma veya Çekme İsteği.

Bu dataclass doğrudan örneklenmek üzere tasarlanmamıştır.

#### huggingface_hub.DiscussionWithDetails[[huggingface_hub.DiscussionWithDetails]]

```python
huggingface_hub.DiscussionWithDetails(title: str, status: typing.Literal['open', 'closed', 'merged', 'draft'], num: int, repo_id: str, repo_type: str, author: str, is_pull_request: bool, created_at: datetime, endpoint: str, events: list, conflicting_files: list[str] | bool | None, target_branch: str | None, merge_commit_oid: str | None, diff: str | None)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L88)

**Parametreler:**

title (`str`) : Tartışma / Birleştirme İsteği başlığı

status (`str`) : Tartışma / Birleştirme İsteğinin durumu. Aşağıdakilerden biri olabilir: * `"open"` * `"closed"` * `"merged"` (yalnızca Birleştirme İstekleri için) * `"draft"` (yalnızca Birleştirme İstekleri için)

num (`int`) : Tartışma / Birleştirme İsteğinin numarası.

repo_id (`str`) : Discussion / Pull Request'in açık olduğu repozituarın kimliği (`"{namespace}/{repo_name}"`).

repo_type (`str`) : Discussion / Pull Request'in açık olduğu repo'nun türü. Olası değerler: `"model"`, `"dataset"`, `"space"`.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

is_pull_request (`bool`) : Bu bir Pull Request olup olmadığı.

created_at (`datetime`) : Tartışma / Çekme İsteğinin oluşturulma `datetime` değeri.

events (`list` of [DiscussionEvent](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionEvent)) : Bu Discussion veya Pull Request'teki `DiscussionEvents` listesi.

conflicting_files (`Union[list[str], bool, None]`, *isteğe bağlı*) : Bu bir Pull Request ise çakışan dosyaların listesi. `self.is_pull_request` `False` ise `None`. Çakışan dosyalar varsa ancak liste alınamıyorsa `True`.

target_branch (`str`, *isteğe bağlı*) : Bu bir Pull Request ise, değişikliklerin birleştirileceği dal. `self.is_pull_request` `False` ise `None`.

merge_commit_oid (`str`, *isteğe bağlı*) : Bu bir birleştirilmiş Pull Request ise, bu değer birleştirme commit'inin OID / SHA'sı olarak ayarlanır, aksi halde `None` olur.

diff (`str`, *isteğe bağlı*) : Bu bir Pull Request ise git diff, değilse `None`.

endpoint (`str`) : Hub'un uç noktası. Varsayılan https://huggingface.co'dur.

git_reference (`str`, *isteğe bağlı*) : (property) Bu bir Pull Request ise değişikliklerin itilebileceği Git referansı, aksi halde `None`.

url (`str`) : (property) Hub'daki tartışmanın URL'si.

[Discussion](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.Discussion) alt sınıfı.

#### huggingface_hub.DiscussionEvent[[huggingface_hub.DiscussionEvent]]

```python
huggingface_hub.DiscussionEvent(id: str, type: str, created_at: datetime, author: str, _event: dict)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L155)

**Parametreler:**

id (`str`) : Olayın kimliği. Onaltılı bir dize.

type (`str`) : Olayın türü.

created_at (`datetime`) : Olayın oluşturma zaman damgasını içeren bir [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime) nesnesi.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

Bir Tartışma veya Pull Request'teki olay.

Somut sınıfları kullanın:
* [TartışmaYorumu](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionComment)
* [DiscussionStatusChange](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionStatusChange)
* [TartışmaCommit](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionCommit)
* [TartışmaBaşlığıDeğişikliği](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionTitleChange)

#### huggingface_hub.DiscussionComment[[huggingface_hub.DiscussionComment]]

```python
huggingface_hub.DiscussionComment(id: str, type: str, created_at: datetime, author: str, _event: dict, content: str, edited: bool, hidden: bool)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L188)

**Parametreler:**

id (`str`) : Olayın kimliği. Onaltılı bir dize.

type (`str`) : Olayın türü.

created_at (`datetime`) : Olayın oluşturma zaman damgasını içeren bir [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime) nesnesi.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

content (`str`) : Yorumun ham markdown içeriği. Bahsetmeler, bağlantılar ve görseller işlenmez.

edited (`bool`) : Bu yorumun düzenlenip düzenlenmediğini belirtir.

hidden (`bool`) : Bu yorumun gizlenip gizlenmediğini belirtir.

Bir Tartışma / Çekme İsteğinde yorum.

[DiscussionEvent](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionEvent) alt sınıfı.

#### huggingface_hub.DiscussionStatusChange[[huggingface_hub.DiscussionStatusChange]]

```python
huggingface_hub.DiscussionStatusChange(id: str, type: str, created_at: datetime, author: str, _event: dict, new_status: str)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L243)

**Parametreler:**

id (`str`) : Olayın kimliği. Onaltılı bir dize.

type (`str`) : Olayın türü.

created_at (`datetime`) : Olayın oluşturma zaman damgasını içeren bir [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime) nesnesi.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

new_status (`str`) : Değişiklikten sonra Discussion / Pull Request'in durumu. Aşağıdakilerden biri olabilir: * `"open"` * `"closed"` * `"merged"` (yalnızca Pull Request'ler için)

Bir Tartışma / Çekme İsteğinde durum değişikliği.

[DiscussionEvent](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionEvent) alt sınıfı.

#### huggingface_hub.DiscussionCommit[[huggingface_hub.DiscussionCommit]]

```python
huggingface_hub.DiscussionCommit(id: str, type: str, created_at: datetime, author: str, _event: dict, summary: str, oid: str)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L271)

**Parametreler:**

id (`str`) : Olayın kimliği. Onaltılı bir dize.

type (`str`) : Olayın türü.

created_at (`datetime`) : Olayın oluşturma zaman damgasını içeren bir [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime) nesnesi.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

summary (`str`) : Commit özeti.

oid (`str`) : Commit'in OID / SHA'sı, onaltılı bir dize olarak.

Bir Pull Request'teki commit.

[DiscussionEvent](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionEvent) alt sınıfı.

#### huggingface_hub.DiscussionTitleChange[[huggingface_hub.DiscussionTitleChange]]

```python
huggingface_hub.DiscussionTitleChange(id: str, type: str, created_at: datetime, author: str, _event: dict, old_title: str, new_title: str)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/community.py#L298)

**Parametreler:**

id (`str`) : Olayın kimliği. Onaltılı bir dize.

type (`str`) : Olayın türü.

created_at (`datetime`) : Olayın oluşturma zaman damgasını içeren bir [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime) nesnesi.

author (`str`) : Tartışma / Çekme İsteği yazarının kullanıcı adı. Kullanıcı o tarihten beri silindiyse `"deleted"` olabilir.

old_title (`str`) : Tartışma / Çekme İsteği için önceki başlık.

new_title (`str`) : Yeni başlık.

Bir Tartışma / Çekme İsteğinde yeniden adlandırma olayı.

[DiscussionEvent](/docs/huggingface_hub/v2.4.0/tr/package_reference/community#huggingface_hub.DiscussionEvent) alt sınıfı.

