Created
January 8, 2019 10:05
-
-
Save abitrolly/90a9e2b70f57e91ca701a3426f184a71 to your computer and use it in GitHub Desktop.
Autolink for `towncrier` file from PR message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
Given: | |
- PR_URL: https://github.com/release-monitoring/anitya/pull/556 | |
Extract: | |
- PR_NUMBER: gex(PR_URL, "\d+$") | |
- FORK | |
- ??? | |
- Check: abitrolly/anitya | |
- BRANCH | |
- ??? | |
- Check: patch-1 | |
Output: | |
- https://github.com/{{ FORK }}/new/{{ BRANCH }}?filename=news/{{ PR_NUMBER }} | |
- Check: https://github.com/abitrolly/anitya/new/patch-1?filename=news/556 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment