Skip to content

Commit

Permalink
Merge pull request #3857 from github/bearcherian/workflow-changes
Browse files Browse the repository at this point in the history
Update workflows based on labels
  • Loading branch information
bearcherian authored Aug 14, 2024
2 parents 50df97e + 7853fc0 commit 0963ed5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# For issues that should be fixed by the docs team,
# this workflow copies the issue to the docs-content repo
# when the `documentation` label is added
# (we do not transfer so that the issue does not disappear for the contributor)
# When the `documentation` label is added for documentation issues,
# this workflow copies the issue to the API team repo which can then
# be transferred to the feature team that owns the problem endpoint
# so they can resolve the documentation problem
# (we do not transfer the original issue so that the issue does not disappear for the contributor)

name: Copy to docs-content
name: Copy documentation issue

on:
issues:
Expand All @@ -12,7 +13,7 @@ on:

jobs:
copy-issue:
name: Copy issue
name: Copy documentation issue
runs-on: ubuntu-latest
if: github.event.label.name == 'documentation'
steps:
Expand All @@ -32,9 +33,9 @@ jobs:
}
return priority
- name: Create an issue in the docs-content repo
- name: Create an issue in the api-platform repo
run: |
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content --label "REST,OpenAPI")"
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/api-platform --label "REST,OpenAPI")"
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{secrets.ISSUE_TRANSFER_TOKEN}}
Expand All @@ -43,7 +44,7 @@ jobs:

- name: Comment on the new issue
run: |
gh issue comment $NEW_ISSUE --body "This issue was originally opened in the rest-api-description repo as $OLD_ISSUE with priority $PRIORITY on a scale of P1 (high) to P4 (low).
gh issue comment $NEW_ISSUE --body "This issue was originally opened in the rest-api-description repo as $OLD_ISSUE with priority $PRIORITY on a scale of P1 (high) to P4 (low). Please transfer it to the appropriate feature team.
:exclamation: When you close this issue, also comment on and close the original issue.
:question: Was this issue something that could have been caught by a linter? If so, suggest a new rule in [#api-platform](https://github.slack.com/archives/C1042T6MS)."
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Copy to ecosytem-api
name: Copy feature issue

on:
issues:
Expand Down

0 comments on commit 0963ed5

Please sign in to comment.