github: add support for Hacktoberfest using labels#7897
Conversation
|
Workflow "Hacktoberfest / opened (pull_request)" is failing right now, because the labels need to be created manually ahead of time. Once @bagder approves, I will also do that and re-run the workflow accordingly. |
Do all PRs opened in October get this label automatically? |
Yes, indeed. That is what the failing task mentioned above would do. |
|
Updated to avoid affecting forks and creating a failed GitHub status entry for those. |
1. Add hacktoberfest label to opened PRs between September 30th and November 1st for easier identification in acceptance step. 2. Replace hacktoberfest label with hacktoberfest-accepted label on PR once a commit with a Closes/Merges reference to it is pushed onto the master branch. With these two steps we can participate in Hacktoberfest while not relying on GitHub to identify PRs as merged due to our rebasing. Requires hacktoberfest and hacktoberfest-accepted labels to exist for PRs on the participating repository. Also requires hacktoberfest topic on the participating repository to avoid affecting forks. Fixes curl#7865 Closes curl#7897
|
I am sorry for the many force-pushes. I had to be sure the repository check is working correctly, now it does. |
|
I think this risks being highly annoying since the vast majority of our pull-requests will not be hacktoberfest material, but I'm willing to try it out. Can we get any feedback if any of the labelled PRs is actually eventually used to claim something? To use as feedback if we're going to try this again next year or not I mean. |
|
@MattIPv4 we're only interested in how many claims there are on PRs on curl, we don't care about exactly which nor who did them. I personally suspect the amount is very close to zero, which makes all our efforts on bending backwards to comply totally wasted. |
I will ask our legal folks if that's a number we can share 👍
I'm not sure why you make this out to be such a big pointless effort on your end, it's just adding a label to some PRs (admittedly, through some automation instead of just by hand), but if you don't want to do it then don't do it? Y'all can remove the topic and not participate if you want to... |
Because I think hacktoberfest needlessly complicates things for (projects working like) us and that I believe we don't have much participation anyway, but we have contributors who still think we should participate. I'm willing to be proved wrong. |
|
Is there a way to opt-out a specific PR or a whole (own) username from participating in this? (My concern is that email addresses will be automatically submitted-to/collected-by the organizer, which may be undesirable for some.) |
|
I guess that would have to be done on their side, because they scan all PRs anyway since approval or merge also counts as participation and that happens even without my changes. At least every approving review triggers a PR to be accepted until it is then closed by our way of merging. I would think that they ignore your submission unless you explicitly signed up for Hacktoberfest. Pinging @MattIPv4 about this again. |
|
Also the way I implemented this, it relies on an additional label hacktoberfest which is set between a PR being opened during the event timeframe and it being closed. You could then just remove the hacktoberfest label while the PR is open. That way it won't get the relevant hacktoberfest-accepted label on closure. @bagder I guess that is a good reason for keeping the proposed approach as well. |
A submission surely needs some sort of active action by the person asking? If I want a hf tshirt I need to go there, register myself and post links/identifiers to the PRs that I claim qualify, don't I? From what I know, @mback2k is the only person who ever participated in hacktoberfest with curl contributions.
Well, it would be as easy to remove the |
Correct, we only fetch PRs for users that've actively signed up to Hacktoberfest. |
Okay then. I just reworked this PR to just require the |
|
I approved it already before this change 😄 |
|
Thanks @bagder. Can I then ask you to re-add the |
|
done! |
Automatically add hacktoberfest-accepted label to PRs opened between September 30th and November 1st once a commit with a close reference to it is pushed onto the master branch. With this workflow we can participate in Hacktoberfest while not relying on GitHub to identify PRs as merged due to our rebasing. Requires hacktoberfest-accepted labels to exist for PRs on the participating repository. Also requires hacktoberfest topic on the participating repository to avoid applying to forked repos. Reviewed-by: Daniel Stenberg Fixes curl#7865 Closes curl#7897
|
I don't know why, but for some unknown reason I had to do this follow-up commit to make it work on this repository: In my own repository it worked like a charm, but it seems like if you push to a repository that does not belong to your own account, the |
|
🤔 This PR shows as merged: https://api.github.com/repos/curl/curl/pulls/7897 |
Yes, that's what happens when you merge exactly the commit in the PR without rebasing. |
Unfortunately the GitHub API requires a token with write permission for both issues and pull-requests to edit labels on even just PRs. Follow up to curl#7897
|
This appears to be working except I notice #7944 wasn't tagged. Should it have been? |
|
No, that PR wasn’t created/opened in or 1 day around of October. |
Sorry for being a little late with this, but I finally got to implementing the necessary workflows and successfully tested them in my curl repository fork with a fake "hacktoberTest" set of labels.
If this PR is accepted/approved for merge, I will also go ahead and retroactively add the labels to all relevant PRs for this years Hacktoberfest once via the GitHub CLI.
--
Automatically add hacktoberfest-accepted label to PRs opened between
September 30th and November 1st once a commit with a close reference
to it is pushed onto the master branch.
With this workflow we can participate in Hacktoberfest while not
relying on GitHub to identify PRs as merged due to our rebasing.
Requires hacktoberfest-accepted labels to exist for PRs on the
participating repository. Also requires hacktoberfest topic on
the participating repository to avoid applying to forked repos.
Fixes #7865