Repository navigation
Add solution PRs to project 18 on open - #171
Merged
Merged
Conversation
New PRs titled `Solution:` are added to the RFP & LPrize Tracking board (logos-co project 18) with Category=LPrize and Status="Proposals & Submissions to review". Mirrors logos-co/rfp's add-to-project.yaml. Uses pull_request_target so fork PRs (how solutions are submitted) get ADD_TO_PROJECT_PAT; no PR code is checked out or executed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Validation passedA reviewer will assess against the prize criteria. Automated check. See solution template and TERMS. |
validate-submission asks contributors with a wrong title to rename the PR; 4 of 83 past submissions (#42, #44, #54, #74) were renamed into `Solution:` and would have been skipped by an opened-only trigger. Trigger on `edited` too, but only fire when the title changes into the prefix, so body edits don't reset Status. Also clarify that pull_request_target runs the default branch's workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds
.github/workflows/add-to-project.yaml. When someone opens a PR whose title starts withSolution:, the workflow adds it to the RFP & LPrize Tracking board (project 18). It then setsCategory→LPrizeandStatus→Proposals & Submissions to review.It's modelled on
logos-co/rfp'sadd-to-project.yaml(logos-co/rfp#207): sameactions/add-to-project@v1.0.2, sameADD_TO_PROJECT_PAT, and the same inlinegithub-scriptGraphQL step. Only the Category option ID differs. I checked the field and option IDs against the live project today.Related to logos-co/ecosystem
content/rfp_lifecycle.md, Tier 1 item 2 (auto-add newSolution: LP-xxxxPRs to project 18).Secret
ADD_TO_PROJECT_PATis now configured as a repo secret here.gh secret list --repo logos-co/lambda-prizeshows it, added 2026-10-06. It's the same fine-grained token aslogos-co/rfp's secret, which was regenerated and updated at the same time. The token's resource owner is logos-co, it has org Projects: Read and write only, and it has no repository access. That's enough because both repos are public, andrfp#207confirms it works.Why
pull_request_targetand notpull_requestSolution PRs here come from forks: all 83 past
Solution:PRs are cross-repository. GitHub doesn't pass repository secrets topull_requestruns from forks, so with a plainpull_requesttrigger the token would be empty and the workflow would fail on every real submission.pull_request_targetruns the workflow file from the default branch, with access to secrets. Its usual risk is checking out or running the fork's code with those secrets. This workflow does neither:actions/checkoutand norun:shell steps.if:expression. That expression is evaluated by Actions, never interpolated into a script, so there's no injection surface.github-scriptstep only uses hard-coded IDs and the item ID returned byadd-to-project.GITHUB_TOKENis limited tocontents: read. The PAT is used only for the two project calls.validate-submission.ymlmakes the same choice for the same reason. That file is untouched.Title filter
The job runs when the title starts with
Solution:. That's a prefix anchor, not "title contains an LP number". It runs in two cases:opened: the PR is opened with aSolution:title.edited: the title changes intoSolution:from something else (github.event.changes.title.fromdoesn't start withSolution:).validate-submissiontells contributors with a wrong title to rename toSolution: LP-XXXX …, so renaming is a normal path, not an edge case. Body edits and other non-title edits don't run the job, so they can't resetStatus.I replayed this against the title history of all 157 PRs in the repo: the title each PR was opened with, plus every
RENAMED_TITLE_EVENT.opened, and 4 fire on a rename into the prefix (Solution: LP-0016 — Anonymous Forum with Threshold Moderation and Membership Revocation #42, Solution: LP-0003 - Private Allowlist / Airdrop Distributor #44, Solution: LP-0019: AI-Powered Logos Ecosystem Onboarding Toolkit [Prize + Solution] #54, Solution: LP-0005 — Private Balance Attestation #74). That's all 83 PRs that have ever had aSolution:title, and none fires twice.LP-, including theSolution: LP-0002:colon variant and the-/–dash variants.Open LP-…,Close LP-…,chore: add solution link…andUpdate LP-0016 status … solution linkare correctly skipped.solutions: LP-0008 …and Solution LP-0012 #46Solution LP-0012(no colon). Both are expected with a strictSolution:anchor. They can be added to the board by hand.Things to know:
startsWith()is case-insensitive (per the Actions expression docs), sosolution: …also matches. That's looser thanvalidate-submission's case-sensitive^Solution: LP-regex. Such a PR lands on the board and gets flagged by the validator, which seems fine for triage.trim(), so a title with a leading space wouldn't match. No past title has one at open time.Solution:and back, or a manual "Re-run jobs", resetsStatustoProposals & Submissions to review. Adding an item that's already on the board returns the existing item, so the field step runs again. Both are rare and acceptable.Scope
CategoryandStatus. It never removes, closes, merges, or edits the PR.λ-Prizefield. Parsing the LP number out of the title is a separate, later automation.reopened, so reopening a PR doesn't reset its fields.actions/add-to-project@v1.0.2/github-script@v7to matchrfp. Both trigger a Node 20 deprecation notice. Moving toadd-to-project@v2.0.0(same inputs and outputs, node24) andgithub-script@v8is best done in both repos together, in a later PR.Manual test before merging
There's no way to dry-run a
pull_request_targetrun without a real PR.pull_request_targetalways runs the workflow file from the default branch, so test PRs opened while this is still unmerged won't trigger it. The secret was regenerated on 2026-10-06 and no workflow run has used the new value yet, so this test is also the token's first real use. To test:master).Solution: LP-0000 — workflow testwith any trivial change. Check the run under Actions → "Add solutions to project". Confirm the PR shows up on project 18 with Category =LPrizeand Status =Proposals & Submissions to review.validate-submissionwill also post a failing validation comment on it. That's expected for a dummy submission.LP-0000 workflow rename test. Confirm the job is skipped and nothing is added. Then edit the PR body and confirm it's skipped again. Then rename it toSolution: LP-0000 — rename testand confirm it's added with the same fields.Open LP-0000: workflow testand confirm the job is skipped and nothing is added to the board.🤖 Generated with Claude Code