Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/tag-codeowner-on-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

jobs:
tag-codeowner:
if: false # Disabled - workflow intentionally turned off
runs-on: ubuntu-latest

steps:
Expand All @@ -24,13 +23,15 @@ jobs:
- name: Extract selected path and tag codeowner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
python3 - <<EOF
import os
import re
import requests

issue_body = """${{ github.event.issue.body }}"""
issue_body = os.environ['ISSUE_BODY']
selected_path = None

# Try to extract the selected path from the issue body
Expand Down Expand Up @@ -69,8 +70,9 @@ jobs:
comment = f"{codeowner} can you please take a look at this issue related to {selected_path}?"
repo = os.environ['GITHUB_REPOSITORY']
token = os.environ['GITHUB_TOKEN']
issue_number = os.environ['ISSUE_NUMBER']

url = f"https://api.github.com/repos/{repo}/issues/${{ github.event.issue.number }}/comments"
url = f"https://api.github.com/repos/{repo}/issues/{issue_number}/comments"
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github.v3+json"
Expand Down
Loading