dotnet / roslyn-tools

Tools used in Roslyn based repos
MIT License
102 stars 76 forks source link

Change the issue tagger to a polling model #1384

Closed Cosifne closed 7 months ago

Cosifne commented 7 months ago

Context: Issue tagger is broken since Allison left. It is using her PAT, which is not great. So we want to switch to Dnceng so that they handle the PAT for us.

However, this brings another problem. The issue tagger is triggered by VS pipeline under DevDiv, but Azure pipeline doesn't support a cross-org trigger.

So it has to be changed into a polling model. now the logic becomes: Every 12 hours:

  1. We fetch 20 builds from VS. (I feel it should be enough to cover every build)
  2. Compare and generate the diff.
  3. Create an issue.
  4. Stop if we see the issue has already been created. (It means the issue is created by the previous run of the pipeline) Or any error happens.

I have run it locally.. but seems like Roslyn/Razor/TS/F# are all not inserted in the last 20 build, so nothing gets changed. And I can't test this using my PAT in cloud. (😅I have been warned) So I would say I prefer to check this in first, and then setup the yml with dnceng, later it can use their PAT to test

Updates:

  1. Tested locally, works https://github.com/dotnet/roslyn/issues/72198
  2. I added the --build command back, it allows the tagger to only tag that VS build. So if someone needs to tag a certain old build it should work.
Cosifne commented 7 months ago

Seems Octokit is not allowed ☹️ I will switch to http client

arkalyanms commented 7 months ago

if partially working, consider merging and iteratively improving

Cosifne commented 7 months ago

if partially working, consider merging and iteratively improving

I have some thoughts on improving this, will back to work on this after I moved the format repo

Cosifne commented 7 months ago

Ping @dibarbet @JoeRobich to review : )