Skip to content

Zac Healy - Repo Access #390

Zac Healy - Repo Access

Zac Healy - Repo Access #390

name: Create a PR from an issue - Outside Collaborators
on:
workflow_dispatch:
issues:
types: [opened]
env:
RUBY_VERSION: 3.1.0
jobs:
create-pr:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'pr-create-issue')
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- run: bundle install
- name: Create a PR from an issue
run: ruby bin/create-pr-from-issue.rb
env:
ISSUE: ${{ toJson(github.event.issue) }}
OPS_BOT_TOKEN: ${{ secrets.MOJ_COLLABORATORS_GENERAL_ADMIN_BOT_PAT }}
REALLY_POST_TO_GH: ${{ secrets.POST_TO_GH }}
NOTIFY_PROD_TOKEN: ${{ secrets.NOTIFY_PROD_TOKEN }}
NOTIFY_TEST_TOKEN: ${{ secrets.NOTIFY_TEST_TOKEN }}
REALLY_SEND_TO_NOTIFY: ${{ secrets.SEND_TO_NOTIFY }}
LOG_LEVEL: "info"
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "Failed GitHub Action Run"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}