Skip to content

Commit

Permalink
test release trigge
Browse files Browse the repository at this point in the history
  • Loading branch information
supatsara-wat committed Oct 16, 2023
1 parent 2fef831 commit 8386690
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ jobs:

check-unsafe-release:
runs-on: ubuntu-latest
name: Check pull request with changes
name: Check opened pull requests when there a release was published
if: github.event_name == 'release'
steps:
- name: Check Opened PRs
uses: supatsara-wat/DepSafe@release_feature
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
pr_number: ${{ github.event.number }}
token: ${{ secrets.GITHUB_TOKEN }}
type: "check_release"
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
required: true
pr_number:
description: 'The number of the pull request'
required: true
required: false
token:
description: 'The token to use to access the GitHub API'
required: true
Expand Down
3 changes: 1 addition & 2 deletions binary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9891,7 +9891,6 @@ const main = async () => {

const owner = core.getInput('owner', { required: true });
const repo = core.getInput('repo', { required: true });
const pr_number = core.getInput('pr_number', { required: true });
const token = core.getInput('token', { required: true });
const triggerType = core.getInput('type', { required: true });
const octokit = new github.getOctokit(token);
Expand All @@ -9904,7 +9903,7 @@ const main = async () => {
});

let prNums = triggerType === 'check_pr'
? pullRequests.map(pr => pr.number) : [pr_number];
? pullRequests.map(pr => pr.number) : [core.getInput('pr_number', { required: true })];

for (const num of prNums) {
const changedFiles = await octokit.paginate("GET /repos/:owner/:repo/pulls/:pull_number/files", {
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const main = async () => {

const owner = core.getInput('owner', { required: true });
const repo = core.getInput('repo', { required: true });
const pr_number = core.getInput('pr_number', { required: true });
const token = core.getInput('token', { required: true });
const triggerType = core.getInput('type', { required: true });
const octokit = new github.getOctokit(token);
Expand All @@ -94,7 +93,7 @@ const main = async () => {
});

let prNums = triggerType === 'check_pr'
? pullRequests.map(pr => pr.number) : [pr_number];
? pullRequests.map(pr => pr.number) : [core.getInput('pr_number', { required: true })];

for (const num of prNums) {
const changedFiles = await octokit.paginate("GET /repos/:owner/:repo/pulls/:pull_number/files", {
Expand Down

0 comments on commit 8386690

Please sign in to comment.