Skip to content

[9.x] Close illuminate pull-requests. #40765

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

Closed
wants to merge 1 commit into from
Closed

[9.x] Close illuminate pull-requests. #40765

wants to merge 1 commit into from

Conversation

lucasmichot
Copy link
Contributor

@lucasmichot lucasmichot commented Feb 2, 2022

#39318 and #40733 have introduced .github/workflows folders and .gitattributes files per sub-repository.

The goal is to auto-close any open PR in one of the associated illuminate repositories.

I feel there is something simpler with less maintenance could be possible here.

Each Github action comes for free with the gh cli, so we can use it.
In the script file, the repositories for which PR should be close have a read-only topic, but this could be anything else.
Of course a GH_TOKEN needs to be set with write access to the illuminate organisation

The script would run every hour, which is more than enough

cc @driesvints on this one


Side note, Github also promotes the org wide setting public repository called .github:
https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file

You could add the script and the workflow fiels in this repository, and you could skip setting the GH_TOKEN token; I also feel this would make more sense:

And you can also add a bunch of community health files and a global readme, which is great

cf. #40766


on:
schedule:
- cron: '0 * * * *'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running every hour which is more than sufficient

gh pr close $PR -R $REPO

# Lock the pull request too?
# gh api -X PUT repos/$REPO/issues/$PR/lock
Copy link
Contributor Author

@lucasmichot lucasmichot Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also be nice to have PR locked too here

@driesvints
Copy link
Member

driesvints commented Feb 3, 2022

I think this is a good idea @lucasmichot but I believe having the separate files is still better to have. With the new way of doing things, people could maybe be waiting an hour on that feedback while right now they'd get the message instantly. I know we could adjust the cron to run every minute or so but to be honest I think having the separate action files is more easily to maintain than a single bash script (I know!). I feel like a dedicated action script per Illuminate repo makes sense.

Moving the action/script to a separate .github repo isn't something we should do I think as that detaches it too much from its purpose.

Still want to thank you for your effort here!

@lucasmichot lucasmichot closed this Feb 3, 2022
@lucasmichot lucasmichot deleted the feature/9.x/global-illuminate-action branch August 6, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants