DefinitelyTyped/dt-mergebot

The daily sync of the PR state is not running anymore.

stof opened this issue · 5 comments

stof commented

https://github.com/DefinitelyTyped/dt-mergebot/actions/runs/3787571682 says that the scheduled workflow is disabled because this repo had no acitivity for at last 60 days.

As this repo is probably meant to have a low level of activity, maybe the scheduled run should actually be triggered by a workflow on the DefinitelyTyped repo rather than in the dt-mergebot repo.

orta commented

Looking at the last run, it was also crashing, https://github.com/DefinitelyTyped/dt-mergebot/actions/runs/3787571682/jobs/6439491663

Porting it to the DT repo is probably the right call, you're welcome to give it a look 👍🏻

stof commented

I sent a PR fixing this crash (and also one fixing the case that it is not actually reported as a crash to GHA as the exit code of the command was not a failure one).

Regarding porting it to the DT repo, I see 3 alternatives:

  1. adding a scheduled workflow in the DT repo that clones the code of the dt-mergebot and run the command (essentially moving the daily.yml workflow to the DT repo, adapting the checkout being done)
  2. adding a scheduled workflow in the DT repo that calls the workflow in this repo as a reusable workflow (but this requires the adaptions of the checkout as well due to how github reusable workflows work, and might require changing the way to access the secret)
  3. adding a scheduled workflow in the DT repo that uses the GitHub API to "manually" trigger a workflow run in this repo

I'm leaning towards 3 as this keeps everything about the execution of the merge-bot in this repo (unlike 1 and 2 where the logs would be in the DT repo) and keeps the code simpler (the daily workflow stays the same than today in this repo except the trigger, and the workflow to add in the DT repo is quite small).

In any case, this requires the DT repo to have some secret holding a token with enough access (either enough access to run as the merge bot for 1&2, or enough access to trigger a workflow run on the merge-bot repo for 3). And I have no idea if there is already such a token in the DT repo.

orta commented

I have write access to both the DT repo, and this repo, so we should be fine to get 3 working - though it does look like there's already a GH_TOKEN which should have access (looking at how it is used https://github.com/search?q=repo%3ADefinitelyTyped%2FDefinitelyTyped%20GH_TOKEN&type=code )

stof commented

@orta I sent PRs on both repos to do that configuration.

stof commented

@orta it looks like the existing token in the DT repo does not have enough permissions to trigger a workflow run in the dt-mergebot repo: https://github.com/DefinitelyTyped/DefinitelyTyped/actions/workflows/daily.yml