Skip to content

Commit f4b9e95

Browse files
committed
senzing-factory/build-resources#140 reuse add to project and update permissions
1 parent 9b60c70 commit f4b9e95

3 files changed

+15
-27
lines changed

.github/workflows/add-to-project-community-dependabot.yaml

+5-15
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,13 @@ on:
44
pull_request:
55
branches: [main]
66

7-
env:
8-
CREATOR: ${{ github.event.pull_request.user.login }}
9-
GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}
10-
117
permissions:
128
repository-projects: write
139

1410
jobs:
1511
add-to-project-dependabot:
16-
name: add issue to Senzing Community project
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- name: assign issue to project
21-
env:
22-
BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }}
23-
if: ${{ env.BOOL == 'true' }}
24-
uses: senzing-factory/github-action-add-issue-to-project@v1
25-
with:
26-
project: "https://github.com/orgs/Senzing/projects/${{ vars.SENZING_PROJECT_COMMUNITY }}"
12+
secrets:
13+
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
14+
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v2
15+
with:
16+
project: ${{ vars.SENZING_PROJECT_COMMUNITY }}

.github/workflows/add-to-project-community.yaml

+7-11
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ permissions:
1111

1212
jobs:
1313
add-to-project:
14-
name: add issue to project
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: assign issue to project
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}
21-
uses: senzing-factory/github-action-add-issue-to-project@v1
22-
with:
23-
project: "https://github.com/orgs/Senzing/projects/${{ vars.SENZING_PROJECT_COMMUNITY }}"
24-
column_name: "Backlog"
14+
secrets:
15+
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
16+
uses: senzing-factory/build-resources/.github/workflows/add-to-project.yaml@v2
17+
with:
18+
classic: false
19+
project-number: ${{ vars.SENZING_PROJECT_COMMUNITY }}
20+
org: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}

.github/workflows/move-pr-to-done-dependabot.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ jobs:
1212
move-pr-to-done-dependabot:
1313
secrets:
1414
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
15-
uses: senzing-factory/build-resources/.github/workflows/move-pr-to-done.yaml@v2
15+
uses: senzing-factory/build-resources/.github/workflows/move-pr-to-done-dependabot.yaml@v2
16+
with:
17+
project: ${{ vars.SENZING_PROJECT_COMMUNITY }}

0 commit comments

Comments
 (0)