Skip to content

Implement Auto-Labeling Workflow for GitHub #177

Open

Description

@aditiverma-21

This workflow will automatically apply specific labels "gssoc-ext" and "hacktoberfest-accepted" to issues and pull requests

Activity

  1. ziadkix commented on Nov 6, 2026

    @ziadkix
    Contributor

    Investigated this today while my own PR #214 was tripping both PR Issue Checker and Auto-label on pull_request. It's not just fork PRs - looking at the last runs list, both workflows have been failing repo-wide since at least Dec 2025 (main, opensource-readme, same conclusion).

    Root cause for auto-label: actions-ecosystem/action-add-labels@v1 is an old action built for a Node runtime the runners no longer ship, plus the job has no explicit permissions block so label writes depend on the default token config. Since @sanjay-kv asked to keep workflow changes centralized, happy to submit the fix as one small PR if you assign this. The labeler step itself can be replaced with github-script so there is no stale third-party action involved at all:

    permissions:
      issues: write
      pull-requests: write
    jobs:
      add-labels:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/github-script@v7
            with:
              script: |
                github.rest.issues.addLabels({
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  issue_number: context.issue.number,
                  labels: ['gssoc-ext', 'hacktoberfest-accepted']
                })

    For pr-checker: the Fixes #<issue> regex itself is fine, but for profile-style PRs (add one name) there is often no issue to fix, so it errors by design on a chunk of incoming PRs. Maybe accept Relates to # / Closes # forms too, or skip the regex for docs-only PRs.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions