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;