Skip to content

Commit d9ec02b

Browse files
Create prlinked.yml
1 parent 6e09b49 commit d9ec02b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/prlinked.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Move PR Issues to Project Column
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
get-date:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
project_name_prefix: ${{ steps.format_date.outputs.formatted_date }}
12+
steps:
13+
- name: Get PR creation date
14+
id: format_date
15+
run: |
16+
# Extract the month and year from the PR creation date
17+
PR_DATE="${{ github.event.pull_request.created_at }}"
18+
FORMATTED_DATE=$(date -d "$PR_DATE" "+%B %Y") # Format to Month Year
19+
echo "formatted_date=${FORMATTED_DATE} Sprint" >> $GITHUB_ENV
20+
21+
move-issues:
22+
needs: get-date
23+
uses: TransactionProcessing/org-ci-workflows/.github/workflows/move-linked-issue.yml@main
24+
with:
25+
pr_number: ${{ github.event.pull_request.number }}
26+
project_column_name: "In review"
27+
project_name_prefix: ${{ needs.get-date.outputs.project_name_prefix }}
28+
secrets:
29+
gh_token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)