Skip to content

Conversation

@laissaouibrahim
Copy link
Contributor

Fixes issue #1531

Changes
Instead of using $(System.PullRequest.PullRequestId) to retreive PR id, check commit message after merge complete and get by REGEX PR ID

Problem
In Azure DevOps : after Merge Complete, $(System.PullRequest.PullRequestId) variable is null. so when script try to post a message/note on PR. we got the issue on #1531

Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

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

Looks promising :)
please can you check my comment ?

const buildId = process.env.BUILD_BUILD_ID || null;
const jobId = process.env.SYSTEM_JOB_ID || null;
const pullRequestIdStr = getEnvVar("SYSTEM_PULLREQUEST_PULLREQUESTID") || prInfo?.idStr || null;
let pullRequestIdStr = getEnvVar("SYSTEM_PULLREQUEST_PULLREQUESTID") || prInfo?.idStr || null;
Copy link
Member

Choose a reason for hiding this comment

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

@blaissaoui we don't need this part, as getpullRequestInfo is called before, and it already contains a call to extractPullRequestIdFromCommitMessage , right ?

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.

2 participants