Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
echo "✅ chore/ branch — issue link waived for maintenance PRs"
exit 0
fi
if grep -qiE '(closes|fixes|resolves)\s+#[0-9]+' /tmp/pr-body.txt; then
if grep -qiE '(closes|fixes|resolves)(\s+#[0-9]+|\s+https?://[^/]+/[^/]+/issues/[0-9]+)' /tmp/pr-body.txt; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Match full GitHub issue URL format in CI gate

The new grep pattern still rejects standard GitHub issue links, so the “Issue linked” gate will fail for PR bodies like Fixes: https://github.com/<owner>/<repo>/issues/123. At this line, the URL branch only allows one path segment before /issues (/[^/]+/issues/...), but real GitHub issue URLs require two (/<owner>/<repo>/issues/...), and the pattern also requires whitespace immediately after fixes|closes|resolves, which excludes the documented Fixes: ... form from the commit message.

Useful? React with 👍 / 👎.

echo "✅ PR references an issue"
else
echo "❌ PR does not reference an issue"
Expand Down
2 changes: 2 additions & 0 deletions crates/diffguard-domain/src/suppression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const DIRECTIVE_PREFIX: &str = "diffguard:";
///
/// This function should be called on the raw line BEFORE preprocessing
/// (so that comment content is visible).
#[must_use]
pub fn parse_suppression(line: &str) -> Option<Suppression> {
let lower = line.to_ascii_lowercase();
lower
Expand All @@ -80,6 +81,7 @@ pub fn parse_suppression(line: &str) -> Option<Suppression> {
/// `masked_comments` should be the output of the comments-only preprocessor
/// for the same line and language. The directive is accepted only if the
/// directive prefix is fully masked (spaces) in `masked_comments`.
#[must_use]
#[allow(clippy::collapsible_if)]
pub fn parse_suppression_in_comments(line: &str, masked_comments: &str) -> Option<Suppression> {
if line.len() != masked_comments.len() {
Expand Down
Loading