Skip to content
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

try adding a label the same way as the other step #6681

Closed
Closed
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
26 changes: 20 additions & 6 deletions .github/workflows/pr-manage-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,26 @@ jobs:
new_pull_request:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: add labels
uses: actions-ecosystem/action-add-labels@v1
with:
labels: |
Age: 🥚 - New
steps:
- name: Checkout
uses: actions/checkout@v3

- name: add label
shell: pwsh
run: |
# ensure labels exist - create them if they don't
# https://docs.github.com/en/rest/reference/issues#create-a-label
$label = "Age: 🥚 - New"
$description = "About 2 hours old"
Write-Output "Ensuring label exists: $label ($description))"
gh api repos/${{ github.repository }}/labels -f name="$label" -f color=000000 -f description="$description"

$thisPr = gh pr view ${{ github.number }} --json number,isCrossRepository
Write-Output "Adding label: $label"
gh pr edit $thisPr.number --add-label "$label"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


scheduled_run:
if: ${{ github.event_name != 'pull_request' }}
Expand Down
Loading