-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label to title #125
Label to title #125
Conversation
I'm testing it here but so far it's not working. |
I'm on mobile, but it looks like the test location needs the "uses" clause nested inside the regular "steps" field; take a look at pyiron workflow or some of the actions reusable workflows for something to mimic |
The other ones use |
No, just invoke it like a usual action invocation: actions/.github/workflows/release.yml Line 21 in 606379c
|
Showing my work: I grabbed the |
Co-authored-by: Liam Huber <[email protected]>
Co-authored-by: Liam Huber <[email protected]>
Co-authored-by: Liam Huber <[email protected]>
Co-authored-by: Liam Huber <[email protected]>
Co-authored-by: Liam Huber <[email protected]>
Alternatively, we could take the token as explicit input like the checkout action does: actions/.github/workflows/push-pull.yml Lines 179 to 181 in 606379c
|
Actually, that's probably wiser -- we might get away with secrets being automatically inherited when we use the action inside the pyiron org, but it is just generally a great action and we want it available globally. |
But don't merge yet, let's try from a repo outside the org to make sure the secret still passes |
Hmm, runs but doesn't fail hard when I try it in my own namespace: https://github.com/liamhuber/action-test/actions/runs/10382454910/job/28745564689?pr=2 EDIT: runs but doesn't work, critically |
Ahh, this is why there are suggestion batches...
Even with the token getting passed in, I'm still getting the same access error from outside the org:
I've got to go to bed, but I'll be available tomorrow at some point in the AM to take another look |
Based on something that hung me up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samwaseda, nice! I'm happy with it. The problems I was running into last night were entirely on my end -- repo settings were off. I fixed the deprecation warning and added some comments to help users. Take a look at my changes, but from my end this is good, working as intended, and useful.
Extensions that make sense to me:
- Proof-check that the label doesn't already start with "[TAG]" -- right now, if you add the "patch" label to a title already starting with "[patch]" you get "[patch] [patch] ...". IMO, ideal behaviour would be for it to not act if the title already starts with the new prefix, and to fail if it starts with a different prefix
- Run the action in reverse, i.e. if the label is updated and it starts with a "[TAG]", add the corresponding label
- Make it flexible, so that tags are space-separated input with defaults of "patch major minor" so it can add arbitrary title prefixes
But with the core functionality working well, IMO those can be left out of this PR
Yeah I thought about the first point. For the second point I got the feeling that it’s more important to have the tag in the title than as a label so I guess we can leave it for now. |
I did more or less what @liamhuber said here