From 3f201d04edbf2fc075fb4a70e711dcf1a8b3603a Mon Sep 17 00:00:00 2001 From: kiy0taka Date: Thu, 6 Jul 2023 09:09:01 +0900 Subject: [PATCH] add manual workflow --- .github/workflows/manual.yml | 30 ++++++++++++++++++++++++++++++ app.js | 2 -- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..854f9ae --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,30 @@ +name: List pull requests + +on: + workflow_dispatch: + inputs: + start_date: + description: 'Start date (yyyy/MM/dd)' + # Default value if no value is explicitly provided + default: '' + # Input has to be provided for the workflow to run + required: true + # The data type of the input + type: string + +jobs: + list: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup npm + run: npm install + + - name: Run script + env: + START_DATE: ${{ inputs.start_date }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: node app.js \ No newline at end of file diff --git a/app.js b/app.js index d6fa08f..af19704 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,4 @@ const GITHUB_TOKEN = process.env.GITHUB_TOKEN; -const SLACK_API_TOKEN = process.env.SLACK_API_TOKEN; -const SLACK_CHANNEL = process.env.SLACK_CHANNEL; const GitHub = require('github-api'); const SlackClient = require('@slack/client').WebClient;