Make PyPI URL look nice in GH Deployments API - #10320
Merged
Merged
Conversation
This is just a tiny drive-by UI improvement.
Member
|
@webknjaz Thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10320 +/- ##
==========================================
- Coverage 87.70% 86.74% -0.96%
==========================================
Files 103 103
Lines 18717 18716 -1
Branches 2881 2881
==========================================
- Hits 16415 16235 -180
- Misses 1600 1774 +174
- Partials 702 707 +5 ☔ View full report in Codecov by Harness. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
environment.urlis only the link GitHub displays for a deployment (the "View deployment"button, the environment badge on the workflow run, the entry in the Deployments API). It does
not influence what gets uploaded or where, and it is not part of the PyPI trusted publishing
identity (that is owner/repo + workflow file + environment name).
So far every release deployment pointed at the generic project page. Appending
${{ github.ref_name }}makes each deployment link to the release it actually published, e.g.https://pypi.org/project/borgbackup/2.0.0b24. The job only runs on tag pushes, and our tags are
bare PEP 440 versions (
1.4.5,2.0.0b24) that already match the PyPI-normalised version, sothe generated URLs resolve.
Context
I was looking into why https://pypi.org/project/borgbackup/1.4.5/#borgbackup-1.4.5.tar.gz says
And was a bit puzzled because the CI seems to be configured just fine. Then I saw this possibility of improvement that I sometimes do in my projects and decided to make an in-browser edit. It's obviously not something I can test per your checklist (and again, it's a drive-by) but I'm the author of
pypa/gh-action-pypi-publishso you can trust my knowledge here.// Side note: I've later checked git blame and realized that the last stable release was made before you've set up TP, so your release automation is newer than that and it's probably fine. But if you need 👀/advice on your process in the future (I've seen the multibranched setup) — feel free to tag me.
Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)