From c39fef497f0c2c963a9db03ef80cdb156f64a425 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Thu, 17 Dec 2020 18:44:31 +0100 Subject: add issue/PR bot Signed-off-by: Giampaolo Rodola --- .github/workflows/issue_bot.yml | 22 +++++++++++++++++++ .github/workflows/issue_labels.yml | 43 -------------------------------------- 2 files changed, 22 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/issue_bot.yml delete mode 100644 .github/workflows/issue_labels.yml (limited to '.github') diff --git a/.github/workflows/issue_bot.yml b/.github/workflows/issue_bot.yml new file mode 100644 index 00000000..ee0c12cc --- /dev/null +++ b/.github/workflows/issue_bot.yml @@ -0,0 +1,22 @@ +name: Issue/PR bot +on: + issues: + types: [opened] + pull_request: + typed: [opened] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_ISSUE_URL: ${{ github.event.issue.url }} + run: | + PYTHONUNBUFFERED=1 python -m pip install --upgrade pip PyGithub + PYTHONUNBUFFERED=1 python scripts/internal/issue_bot.py diff --git a/.github/workflows/issue_labels.yml b/.github/workflows/issue_labels.yml deleted file mode 100644 index 9f4adb11..00000000 --- a/.github/workflows/issue_labels.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Executed every time an issue or PR is opened. Inspects the title string -# and sets the appropriate labels. -# See: https://github.com/Naturalclar/issue-action - -name: "Set issue labels" -on: - issues: - types: [opened] - pull_request: - typed: [opened] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: Naturalclar/issue-action@v2.0.2 - with: - title-or-body: "title" - github-token: "${{ secrets.GITHUB_TOKEN }}" - parameters: '[ - {"keywords": ["aix"], "labels": ["aix"], "assignees": ["wiggin15"]}, - {"keywords": ["cygwin"], "labels": ["cygwin"], "assignees": [""]}, - {"keywords": ["freebsd"], "labels": ["freebsd"], "assignees": [""]}, - {"keywords": ["linux", "ubuntu", "redhat", "red hat", "mint", "centos", "archlinux", "debian", "alpine", "gentoo", "fedora", "slackware", "suse", "opensuse", "manylinux", "apt", "rpm", "yum", "RHEL", "kali", "/sys/class", "/sys/block", "/proc/net", "/proc/disk", "/proc/smaps", "/proc/vmstat"], "labels": ["linux"], "assignees": [""]}, - {"keywords": ["macos", "mac ", "osx", "os x", "mojave", "sierra", "capitan", "darwin", "yosemite", "catalina", "xcode", "dylib"], "labels": ["macos"], "assignees": [""]}, - {"keywords": ["netbsd"], "labels": ["netbsd"], "assignees": [""]}, - {"keywords": ["openbsd"], "labels": ["openbsd"], "assignees": [""]}, - {"keywords": ["sunos", "solaris"], "labels": ["sunos"], "assignees": ["wiggin15"]}, - {"keywords": ["windows", "win32", "WinError", "WindowsError", "win10", "win7", "win", "mingw", "msys", "studio", "microsoft", "MSVC", "TCHAR", "WCHAR", "make.bat", ".bat", "appveyor", "handles", "CloseHandle", "GetLastError", "NtQuery", "OpenProcess", "TerminateProcess", "DLL", "System Idle Process"], "labels": ["windows"], "assignees": [""]}, - {"keywords": ["wsl"], "labels": ["wsl"], "assignees": [""]}, - {"keywords": ["enhancement"], "labels": ["enhancement"], "assignees": [""]}, - {"keywords": ["doc ", "document ", "documentation", "docfix", "readthedocs", "pythonhosted", "HISTORY", "README", "index.rst"], "labels": ["doc"], "assignees": [""]}, - {"keywords": ["idea", "proposal", "api", "feature"], "labels": ["api", "enhancement"], "assignees": [""]}, - {"keywords": ["performance", "speedup", "slow", "fast"], "labels": ["performance"], "assignees": [""]}, - {"keywords": ["pypy"], "labels": ["pypy"], "assignees": [""]}, - {"keywords": ["psposix", "_psutil_posix", "waitpid", "statvfs", "/dev/tty", "/dev/pts"], "labels": ["unix"], "assignees": [""]}, - {"keywords": ["memory leak", "leaks memory", "memleak", "mem leak"], "labels": ["memleak"], "assignees": [""]}, - {"keywords": ["example script", "examples script", "example dir", "scripts/"], "labels": ["scripts"], "assignees": [""]}, - {"keywords": ["test", "tests", "travis", "coverage", "travis", "cirrus", "appveyor", "continuous integration", "dev guide", "devguide", "sphinx", "unittest", "pytest"], "labels": ["tests"], "assignees": [""]}, - {"keywords": ["Makefile"], "labels": ["unix"], "assignees": [""]}, - {"keywords": ["segfault", "segmentation fault", "core dumped", "RuntimeError", "WinError", "WindowsError", "MemoryError", "OverflowError", "ZeroDivisionError", "SystemError", "MemoryError"], "labels": ["priority-high"], "assignees": [""]}, - {"keywords": ["fail", "can''t execute", "can''t install", "install error", "installation error", "crash", "critical"], "labels": ["bug"], "assignees": [""]}, - {"keywords": ["wheel"], "labels": ["wheels"], "assignees": [""]} -]' -- cgit v1.2.1