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 monitor/ignore bot commands #1516

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Fix monitor/ignore bot commands #1516

merged 1 commit into from
Oct 3, 2024

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Oct 3, 2024

The monitor/ignore bot commands expected to receive as comment ID the same ID as the one returned by the gh CLI. That would have been way too easy! The comment ID in a workflow is an integer while the ID returned by the gh CLI is a string (probably an encoding of the number?). The code now computes the URL of the comment from the comment ID and uses that instead to find the comment in the list returned by gh.

The update also fixes a bug in the regular expression used to extract the actual comment (extracted string included the "because" prefix).

Closes #1496.

The monitor/ignore bot commands expected to receive as comment ID the same ID
as the one returned by the `gh` CLI. That would have been way too easy! The
comment ID in a workflow is an integer while the ID returned by the `gh` CLI is
a string (probably an encoding of the number?). The code now computes the URL
of the comment from the comment ID and uses that instead to find the comment in
the list returned by `gh`.

The update also fixes a bug in the regular expression used to extract the
actual comment (extracted string included the "because" prefix).

Closes #1496.
@tidoust tidoust requested a review from dontcallmedom October 3, 2024 15:53
@tidoust tidoust merged commit 345fa5a into main Oct 3, 2024
1 check failed
@tidoust tidoust deleted the fix-monitor branch October 3, 2024 16:23
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.

Bot misses the monitor comment
2 participants