Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
area/workflow/dotnet_clipackage:
- aws_lambda_builders/workflows/dotnet_clipacakge/*
- aws_lambda_builders/workflows/dotnet_clipacakge/**/*

area/workflow/go_modules:
- aws_lambda_builders/workflows/go_modules/*
- aws_lambda_builders/workflows/go_modules/**/*

area/workflow/java_gradle:
- aws_lambda_builders/workflows/java_gradle/*
- aws_lambda_builders/workflows/java_gradle/**/*

area/workflow/java_maven:
- aws_lambda_builders/workflows/java_maven/*
- aws_lambda_builders/workflows/java_maven/**/*

area/workflow/node_npm:
- aws_lambda_builders/workflows/nodejs_npm/*
- aws_lambda_builders/workflows/nodejs_npm/**/*

area/workflow/python_pip:
- aws_lambda_builders/workflows/python_pip/*
- aws_lambda_builders/workflows/python_pip/**/*

area/workflow/ruby_bundler:
- aws_lambda_builders/workflows/ruby_bundler/*
- aws_lambda_builders/workflows/ruby_bundler/**/*
8 changes: 8 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This folder has Github Actions for this repo.

** pr-labler **

This is responsible for tagging our prs automattically. The primary thing it does is tags internal vs external (to the team) PRs. It will
also tag PRs with `area/*` tags based upon the files being changes in the PR. This is run on `pull_request_target` which only runs what is
in the repo not what is in the Pull Request. This is done to help guard against a PR running and changing. For this, the Action should NEVER
download or checkout the PR. It is purely for tagging/labeling not CI.
38 changes: 38 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
apply-file-based-labels:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
apply-internal-external-label:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const maintainers = ['jfuss', 'c2tarun', 'hoffa', 'awood45', 'CoshUS', 'aahung', 'hawflau', 'mndeveci', 'ssenchenko', 'wchengru', 'mingkun2020', 'qingchm', 'moelasmar', 'xazhao', 'mildaniel', 'marekaiv', 'torresxb1']
if (maintainers.includes(context.payload.sender.login)) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['pr/internal']
})
} else {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['pr/external']
})
}