Skip to content
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

Fix duplicate Nixpkgs diff comment #192

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

infinisil
Copy link
Member

A duplicate comment is posted when the action runs the first time, because the posted comment isn't reused.

This could be seen in #185, and it shouldn't happen in this PR anymore.

A duplicate comment is posted when the action runs the first time,
because the posted comment isn't reused.
Copy link

github-actions bot commented Apr 15, 2024

Nixpkgs diff

Copy link

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

On Matrix, @infinisil provided this explanation of the code:

  1. Every step in GitHub Actions can have outputs. There's one step which finds a comment with "Nixpkgs diff" in it (Find Comment), and its output is used for the next step to target (comment-id: ${{ steps.fc.outputs.comment-id }})

  2. ${{ ... }} is GitHub specific syntax that gets interpolated at runtime.

  3. The create-or-update-comment action creates an output named "comment-id".

This PR makes them work together to have just one comment.

@0x4A6F 0x4A6F merged commit 87c4879 into master Apr 16, 2024
2 checks passed
@0x4A6F 0x4A6F deleted the fix-nixpkgs-diff-duplicate-comment branch April 16, 2024 18:18
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-04-16/43533/1

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

Successfully merging this pull request may close these issues.

5 participants