Skip to content

Commit

Permalink
docs: update issue processing script
Browse files Browse the repository at this point in the history
  • Loading branch information
IBIBENDUM committed Nov 29, 2024
1 parent 53538b5 commit 215a06a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,19 @@ def main():

print(f"Заголовок обновлен на: {new_title}")

# Добавляем метку с названием предмета
current_labels = issue.get("labels", [])
current_label_names = [label["name"] for label in current_labels]

if subject not in current_label_names:
labels_url = f"{issue_url}/labels"
label_response = requests.post(
labels_url,
headers=headers,
json={"labels": [subject]}
)
label_response.raise_for_status()
print(f"Метка '{subject}' добавлена к issue #{issue_number}")

if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
SCRIPT_PAT: ${{ secrets.script_pat }}
REPO_NAME: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: python .github/workflows/mistake_format_title.py
run: python .github/workflows/mistake_processing.py

0 comments on commit 215a06a

Please sign in to comment.