mirror of
https://github.com/curl/curl.git
synced 2026-07-24 01:47:20 +03:00
GHA/hacktoberfest-accepted: tidy up item order
`if`, then `env`, then `run`. Also tidy up quotes in env entries. Closes #17551
This commit is contained in:
parent
17a669426f
commit
d16a020a87
1 changed files with 10 additions and 10 deletions
20
.github/workflows/hacktoberfest-accepted.yml
vendored
20
.github/workflows/hacktoberfest-accepted.yml
vendored
|
|
@ -32,40 +32,40 @@ jobs:
|
|||
fetch-depth: 100
|
||||
|
||||
- name: Check whether repo participates in Hacktoberfest
|
||||
id: check
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
gh config set prompt disabled && echo "label=$(
|
||||
gh repo view --json repositoryTopics --jq '.repositoryTopics[].name' | grep '^hacktoberfest$')" >> $GITHUB_OUTPUT
|
||||
id: check
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Search relevant commit message lines starting with Closes/Merges
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
env:
|
||||
GITHUB_EVENT_BEFORE: '${{ github.event.before }}'
|
||||
GITHUB_EVENT_AFTER: '${{ github.event.after }}'
|
||||
run: |
|
||||
git log --format=email "${GITHUB_EVENT_BEFORE}..${GITHUB_EVENT_AFTER}" | \
|
||||
grep -Ei '^Close[sd]? ' | sort | uniq | tee log
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
|
||||
- name: Search for Number-based PR references
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
grep -Eo '#([0-9]+)' log | cut -d# -f2 | sort | uniq | xargs -t -n1 -I{} \
|
||||
gh pr view {} --json number,createdAt \
|
||||
--jq '{number, opened: .createdAt} | [.number, .opened] | join(":")' | tee /dev/stderr | \
|
||||
grep -Eo '^([0-9]+):[0-9]{4}-(09-30T|10-|11-01T)' | cut -d: -f1 | sort | uniq | xargs -t -n1 -I {} \
|
||||
gh pr edit {} --add-label 'hacktoberfest-accepted'
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Search for URL-based PR references
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
grep -Eo 'github.com/(.+)/(.+)/pull/([0-9]+)' log | sort | uniq | xargs -t -n1 -I{} \
|
||||
gh pr view 'https://{}' --json number,createdAt \
|
||||
--jq '{number, opened: .createdAt} | [.number, .opened] | join(":")' | tee /dev/stderr | \
|
||||
grep -Eo '^([0-9]+):[0-9]{4}-(09-30T|10-|11-01T)' | cut -d: -f1 | sort | uniq | xargs -t -n1 -I {} \
|
||||
gh pr edit {} --add-label 'hacktoberfest-accepted'
|
||||
if: steps.check.outputs.label == 'hacktoberfest'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue