Skip to content

Add AI-generated PR labeling workflow #269

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged

Conversation

iainbreen
Copy link
Contributor

Summary

  • Adds GitHub workflow to automatically label AI-generated PRs
  • Uses shared workflow from intercom/github-action-workflows
  • Triggers on PR open, edit, and synchronize events

Test plan

  • Workflow file is syntactically valid
  • Workflow references correct shared workflow
  • No manual testing required - this is a standard workflow addition

🤖 Generated with Claude Code

Comment on lines +10 to +11
uses: intercom/github-action-workflows/.github/workflows/label-ai-prs.yml@main
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 2 days ago

To fix the issue, we will add a permissions block at the root of the workflow. This block will explicitly define the minimal permissions required for the workflow to function. Based on the context, the workflow likely needs contents: read to access repository contents and pull-requests: write to label pull requests. These permissions will be applied to all jobs in the workflow unless overridden by a job-specific permissions block.


Suggested changeset 1
.github/workflows/label-ai-generated-prs.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/label-ai-generated-prs.yml b/.github/workflows/label-ai-generated-prs.yml
--- a/.github/workflows/label-ai-generated-prs.yml
+++ b/.github/workflows/label-ai-generated-prs.yml
@@ -3,2 +3,6 @@
 
+permissions:
+  contents: read
+  pull-requests: write
+
 on:
EOF
@@ -3,2 +3,6 @@

permissions:
contents: read
pull-requests: write

on:
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

@lsewilson lsewilson left a comment

Choose a reason for hiding this comment

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

Approved via script

Copy link

@lsewilson lsewilson left a comment

Choose a reason for hiding this comment

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

Approved via script

@iainbreen iainbreen merged commit 1a4eeb1 into main Jun 16, 2025
6 checks passed
@iainbreen iainbreen deleted the ib/add-ai-auto-labeling branch June 16, 2025 13:10
iainbreen added a commit that referenced this pull request Jun 17, 2025
iainbreen added a commit that referenced this pull request Jun 17, 2025
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.

2 participants