Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Run agentscan if first-contribution left a comment - #32338

Open
iccir wants to merge 2 commits into
matplotlib:mainfrom
iccir:agentscan
Open

Run agentscan if first-contribution left a comment#32338
iccir wants to merge 2 commits into
matplotlib:mainfrom
iccir:agentscan

Conversation

@iccir

@iccir iccir commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

PR summary

This PR adds an additional step to the "PR Greetings" workflow: if first-contribution leaves a comment, we then run agentscan and potentially add a label.

AgentScan Result Label
Organic None
Mixed automation: mixed
Automated automation: automated
Community Flagged automation: flagged

What is agentscan?

AgentScan is a website, GitHub action, and GitHub app that uses identity to figure out automation patterns. See https://agentscan.tools/adopters for a list of other projects using it (notably: node.js).

I found the website a few days ago and have been reviewing previously-closed PRs with it. It seems to do a very good job of detecting automated activity. The website provides graphs of authors' recent history.

Approach

My first idea was to make a new workflow that would run when the first-contributor label was applied. Based on yesterday's meeting comments regarding the PR Template checker, I'm not sure if this will work.

Instead, I check the comment-url output of the first-contribution action. This should be an empty string if no comment was left. This adds an additional contents: read permission to the job that first-contribution doesn't need. I'm not sure if there is a better way to isolate permissions.

Only labels are added to help triage. While agentscan has other features, I didn't want it to automatically close PRs or make comments.

This is my first time using GitHub workflows, I probably made mistakes. Please scrutinize.

Open questions for discussion:

  • Do we want to do this at all?
  • Should we only add a label for "automated" and not "mixed"?
  • Should we change the label names?

Follow-up Work

If this is approved, we will need to add the corresponding GitHub labels prior to merging.

AI Disclosure

  • I used AI to help me figure out the exact YAML syntax to use.
  • All of the individual settings were chosen by me after reading through the agentscan documentation.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • [N/A] New and changed code is tested I could not figure out a good way to test this
  • [N/A] Plotting related features are demonstrated in an example
  • [N/A] New features and API changes have release notes
  • [N/A] Documentation complies with general and docstring guidelines

Comment thread .github/workflows/pr_welcome.yml Fixed

@melissawm melissawm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a great tool, and if it works it's a better solution than #32082, I'm +1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants