Skip to content

all-maintainers.nix: init; flake/dev/generate-all-maintainers: init #3525

Merged
khaneliman merged 3 commits intonix-community:mainfrom
khaneliman:maintainers
Jul 8, 2025
Merged

all-maintainers.nix: init; flake/dev/generate-all-maintainers: init #3525
khaneliman merged 3 commits intonix-community:mainfrom
khaneliman:maintainers

Conversation

@khaneliman
Copy link
Copy Markdown
Contributor

@khaneliman khaneliman commented Jul 3, 2025

Copying implementation from nix-community/home-manager#7350 with tweaks to work in nixvim. nix-community/infra#1837

@khaneliman khaneliman force-pushed the maintainers branch 4 times, most recently from 83e7d6e to 68927a8 Compare July 3, 2025 15:47
@khaneliman khaneliman requested a review from MattSturgeon July 3, 2025 17:18
@khaneliman khaneliman force-pushed the maintainers branch 2 times, most recently from 1783e39 to 2ecc836 Compare July 3, 2025 17:23
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Initial review from my phone, so I may have missed some wider context.

Looks good!

@khaneliman khaneliman requested a review from MattSturgeon July 3, 2025 19:50
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Sorry for dragging this through multiple review rounds. My intention was to give early feedback (earlier) and look in more detail later (now).

I have a few minor nits/questions.

Also I feel like we can further simplify the nix codegen if we can avoid needing to embed comments. I think the simplest way would be to create an attrset that represents the final value and then render that in one go using toPretty. See relevant comment(s).

Also, it'd be nice to have the file out of the top-level directory. E.g. moved to lib/ or generated/.

@zowoq
Copy link
Copy Markdown
Contributor

zowoq commented Jul 7, 2025

I've renamed nixvim team to nixvim-committers and created nixvim-maintainers with triage permissions.

https://github.com/orgs/nix-community/teams/nixvim-committers
https://github.com/orgs/nix-community/teams/nixvim-maintainers

nix-community/infra#1886

Also added "Organization permissions" -> "Members" -> "Read-only" to the nixvim-ci app.

@khaneliman khaneliman force-pushed the maintainers branch 13 times, most recently from 29676d6 to 903047b Compare July 7, 2025 13:40
@khaneliman khaneliman force-pushed the maintainers branch 4 times, most recently from 2869b03 to 3bbcba3 Compare July 7, 2025 17:15
@khaneliman
Copy link
Copy Markdown
Contributor Author

khaneliman commented Jul 7, 2025

Test run https://github.com/khaneliman/nixvim/actions/runs/16123566518/job/45495054506 I don't have git config setup for PR on fork atm But, should work when the user-info step returns the app information, like in HM. Something still isn't right with generating the file in this refactoring here, though.. taking a look.

@khaneliman
Copy link
Copy Markdown
Contributor Author

https://github.com/khaneliman/nixvim/actions/runs/16123952334/job/45496299935 alright, have to capture the output from validation.

@khaneliman khaneliman force-pushed the maintainers branch 3 times, most recently from 2fe8b28 to 1f85434 Compare July 7, 2025 20:13
@khaneliman
Copy link
Copy Markdown
Contributor Author

Alright, after doing some testing https://github.com/khaneliman/nixvim/actions/runs/16126857467 I made it work better with existing PRs

Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

No issues with the diff from me. And I trust your testing process.

Minor comments below, all either trivial or subjective. They can all be ignored if preferred.

}
}
}
' | jq --raw-output '
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI gh api also has a --jq flag:

Suggested change
' | jq --raw-output '
' --jq '

Sometimes it's still worth it to pipe to jq though, e.g. if you want to use --exit-status to trigger a failure if the jq query doesn't match the input JSON.


We use a similar graphql query elsewhere, but one issue I'm now spotting is that headRefName could also match PRs on forks that use the same branch name... I don't see an obvious quick fix in the graphql explorer, and the issue applies to both places, so this is fine for now.

Used to generate a full maintainers.nix file that can be used for RFC39
invites. We will use these invites to support requesting reviews from
maintainers.
Used to keep the maintainers list updated used for RFC39 invites.
update-maintainers:
runs-on: ubuntu-latest
if: github.repository_owner == 'nix-community' || github.event_name == 'workflow_dispatch'
# Permissions required for workflow
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: this makes it sound like this is the canonical place where the permissions are defined. However we actually have them in two places, and this is the less important of the two since it is only used on forks that don't have an APP_ID.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure why this would be less important? These are required for a token to get generated with permissions required, the others are just to limit the scope of permissions granted to an app.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These dictate the permissions of github.token and are entirely unrelated to the app token.

I said they're less important because github.token is only used when there's no app token.

Copy link
Copy Markdown
Contributor Author

@khaneliman khaneliman Jul 8, 2025

Choose a reason for hiding this comment

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

These dictate the permissions of github.token and are entirely unrelated to the app token.

the others are just to limit the scope of permissions granted to an app.

Understood, as part of previous response.

Guess its differing opinion on what's important. I think declaring the app token permissions as less because they are optional for functionality. But, the app token permissions are just a couple lines lower with the exact same naming convention and didn't think it warranted copy/paste for same explanation.

@khaneliman khaneliman added this pull request to the merge queue Jul 8, 2025
Merged via the queue into nix-community:main with commit 6b56adb Jul 8, 2025
2 checks passed
@khaneliman khaneliman deleted the maintainers branch July 8, 2025 14:16
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.

4 participants