feat(project): hourly reconciler para Project nfe/5 (abordagem híbrida)#22
Open
feat(project): hourly reconciler para Project nfe/5 (abordagem híbrida)#22
Conversation
Hybrid approach: this reconciler is the safety-net for issues that escape the native "Auto-add to project" workflow (to be enabled in the Project UI for the main repos). Runs hourly, diffs all open org issues against Project #5 membership, and adds orphans via addProjectV2ItemById.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexto
Alternativa enxuta ao #20. Em vez de sincronizar um workflow em cada um dos 100 repos da org (template + provisioner), usa o workflow builtin nativo do Projects v2 para os repos principais e mantém apenas um reconciler aqui no
nfe/.githubcomo safety-net.Origem: avaliação conjunta de como cobrir o gap "issues criadas pela UI não entram no Project #5" sem poluir
.github/workflows/nos repos da org.Arquitetura
O que este PR adiciona
Um único arquivo:
.github/workflows/reconcile-project-items.ymlworkflow_dispatchmanual (comdry_run)pull_request == null)PVT_kwDOAID6As4BUp17via paginaçãocomm -23dos dois sets → órfãsaddProjectV2ItemByIdvia GraphQLaddProjectV2ItemById)Vantagens vs #20
nfe/.githubrepo+workflow+projectprojectTrade-off explícito: repos fora da lista curada do builtin têm latência de até 1h em vez de <30s. Se alguma issue precisar entrar no Project instantaneamente, ela deve estar num repo listado no builtin.
1. Secret org-level
WORK_PROJECT_TOKENPAT em https://github.com/settings/tokens com scope
projectapenas (não precisa dereponemworkflownesta abordagem).Adicionar como secret org-level em https://github.com/organizations/nfe/settings/secrets/actions:
WORK_PROJECT_TOKENnfe/.github)2. Habilitar builtin "Auto-add to project" no Project #5
Em https://github.com/orgs/nfe/projects/5/workflows:
is:issue,is:openRepos fora dessa lista ainda serão cobertos pelo reconciler em até 1h.
Plano de rollout
WORK_PROJECT_TOKENdry_run=trueuma vez viaActions → Reconcile Project items → Run workflow → dry_run=true— confere contagem de órfãsRelação com #20
Este PR substitui o #20. Se for aprovado, #20 pode ser fechado sem merge — o reconciler aqui já é idêntico ao arquivo
reconcile-project-items.ymldo #20; o que sai são o template + o provisioner.Test plan
WORK_PROJECT_TOKENcriado com scopeprojecte visível paranfe/.githubis:issue,is:opendry_run=true— contagem de órfãs bate com query manual🤖 Generated with Claude Code