Skip to content
Open
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions .github/workflows/url_deleter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: URL Deleter
on:
issues:
types:
- opened
- edited
jobs:
moderate:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Thanks to https://regex101.com/library/cX0pJ8 and tp https://www.freeformatter.com/json-escape.html
auto-close-rules: |
[
{
"type": "title",
"regex": "^((([A-Za-z]{3,9}:(?:\\\/\\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\\/[\\+~%\\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[.\\!\\\/\\\\w]*))?)$",
"message": "URL does not belong here (#43). Go to https://github.com/nelsontky/gh-pages-url-shortener-db/issues instead"
}
]
auto-close-ignore-label: do-not-autoclose
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ be reliable. Do proceed at your own risk!_
1. Format for `GITHUB_ISSUES_LINK`:
`https://api.github.com/repos/{owner}/{repo}/issues/`
1. Remember the trailing `/`!
1. If you are going to use your forked repo, then delete `url_deleter.yml` in your `.github/workflows` folder or [disable workflow manually](https://docs.github.com/en/actions/using-workflows/disabling-and-enabling-a-workflow#disabling-a-workflow)
1. Push your changes to your forked repo, and your low cost and cool as heck URL
shortener will be ready for use!

Expand Down