chore(github-actions): update contributor and project sync workflows
What kind of change does this PR introduce?
- Since we have branch protection rules, automated commits can't be made. Therefore, both workflows will now create pull requests instead.
Issue Number:
- None
Screenshots/videos:
If relevant, did you update the documentation?
Summary
Does this PR introduce a breaking change?
built with Refined Cloudflare Pages Action
⚡ Cloudflare Pages Deployment
| Name | Status | Preview | Last Commit |
|---|---|---|---|
| website | ✅ Ready (View Log) | Visit Preview | f3ea9d4011695a6373cec16707c4b5f1259beca8 |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
cc3ce3e) to head (f3ea9d4). Report is 16 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #869 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 20 20
Branches 12 12
=========================================
Hits 20 20
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Great job with this!
Could it be possible to add another step to approve and another one to merge?
I don't think it's possible to do this within the same workflow since we need to create the pull request first which take time, then approve it, and finally merge it. But lemme check.
However, it could be easily done with a separate workflow.
However, it could be easily done with a separate workflow.
We'll need to do something to avoid the cumulation of unreviewed PRs.
However, it could be easily done with a separate workflow.
We'll need to do something to avoid the cumulation of unreviewed PRs.
I will be creating another workflow to approve and merge the pr.
Added auto approve and auto merge in the same workflow.
For auto merge, these condition must be true:
https://github.com/peter-evans/enable-pull-request-automerge?tab=readme-ov-file#conditions
Added auto approve and auto merge in the same workflow.
This seems like a bad idea. (Unless I'm misunderstanding what's being added.)
It seems like you're wanting an action to automatically approve and merge PRs? Why? PRs are intended for review... by humans.
Added auto approve and auto merge in the same workflow.
This seems like a bad idea. (Unless I'm misunderstanding what's being added.)
It seems like you're wanting an action to automatically approve and merge PRs? Why? PRs are intended for review... by humans.
Basically, both workflows work to fetch the latest contributor data and our roadmap project data and save it in a file. This allows us to use the data on our website, helping to reduce the number of API calls to GitHub by using the data directly from a JSON file. There is nothing to review since both are just json file.
And since we have branch protection rule we can't directly push to main branch. We need to create pull request first.
https://github.com/json-schema-org/website/pull/869#pullrequestreview-2244053294
And since we have branch protection rule we can't directly push to main branch. We need to create pull request first.
Then maybe this repo isn't the best place to store the results of the data fetch. Maybe we store it in another repo (or a gist) where only the bot has push rights (and maybe the project admins). I use a gist to store some data for a custom badge on my repo (action).
Automation like this seems subversive to me. When I encounter hacks like this, it usually means I've taken a wrong turn somewhere; that I'm doing something wrong.
Automation like this seems subversive to me. When I encounter hacks like this, it usually means I've taken a wrong turn somewhere; that I'm doing something wrong.
Hi everyone here. This is the solution I suggested and I take responsibility. The fetched files will be used to build a future roadmap page and improve the current community page. We are storing the data to avoid doing synchronous API calls and avoid rate limit issues. I understand your concerns and I am happy to discuss alternatives. Gist seems like over-complicating things but I have never implemented it before. I know that AsyncAPI is doing something similar to us in their repository.
I expect you're looking at something like https://github.com/asyncapi/website/pull/3142?
If that's the direction you want to go, okay. I've given my opinion.