Skip to content

ci/update: cleanup & fix re-apply logic now that we use nixvim-ci[bot] #3418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2025

Conversation

MattSturgeon
Copy link
Member

#3412 demonstrated that the "re-apply extra commits" logic is broken now that we commit updates as nixvim-ci[bot]. The logic is still looking for a base commit authored by github-actions[bot].

Additionally, include some cleanup refactoring for how we get the committer info. This is the same logic used in my personal config and also recently added to home-manager's CI.

@MattSturgeon MattSturgeon requested a review from a team June 2, 2025 10:25
Get id, name, & email in a single `user-info` step.
We need to look for a commit authored by `nixvim-ci[bot]`,
not `github-actions[bot]`.
@MattSturgeon MattSturgeon force-pushed the ci/fix-update-reapply branch from 6c0691b to 80934be Compare June 3, 2025 09:22
@MattSturgeon

This comment was marked as resolved.

This comment was marked as resolved.

Copy link
Contributor

mergify bot commented Jun 3, 2025

This pull request, with head sha 80934be3e934769249b9e6afcec31604f5426d9c, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 80934be3e934769249b9e6afcec31604f5426d9c is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch ci/fix-update-reapply, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 80934be into main Jun 3, 2025
4 checks passed
@mergify mergify bot temporarily deployed to github-pages June 3, 2025 09:29 Inactive
@MattSturgeon MattSturgeon deleted the ci/fix-update-reapply branch June 3, 2025 09:29
@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 3, 2025

Git push to origin failed for nixos-25.05 with exitcode 1

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 3, 2025

Git push to origin failed for nixos-24.11 with exitcode 1

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 3, 2025

Git push to origin failed for nixos-25.05 with exitcode 1

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 3, 2025

Git push to origin failed for nixos-24.11 with exitcode 1

@MattSturgeon
Copy link
Member Author

MattSturgeon commented Jun 3, 2025

Git push to origin failed for nixos-25.05 with exitcode 1

The actual error is:

! [remote rejected] backport/nixos-24.11/3418 -> backport/nixos-24.11/3418 (refusing to allow a GitHub App to create or update workflow `.github/workflows/update.yml` without `workflows` permission)

I.e. we can't backport workflow changes because nixvim-ci[bot] doesn't have workflows: write permission.

I'm unsure if we want to change this, and if so whether it needs explicit permissions in the actions/create-github-app-token step? See Create a token with specific permissions and permission-<permission name>.

We probably also need to ask an org owner to add the permission to our app installation? Unless @GaetanLepage is able? This would be a two step process; first edit the nixvim-ci app itself to "require" the permission, then re-authenticate the repo installation to "accept" the new permissions.

@MattSturgeon
Copy link
Member Author

I.e. we can't backport workflow changes because nixvim-ci[bot] doesn't have workflows: write permission.

Hm. I'm not sure why #3423 was successful when this wasn't... Maybe because this adds a "step" with a different id (user-id -> user-info)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants