Skip to content

2025 04 15 tidy #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -10,31 +10,31 @@ async function run () {
const myToken = core.getInput('myToken')
// use myToken: ${{ secrets.GITHUB_TOKEN }} in your workflow
const octokit = github.getOctokit(myToken)
console.log("github object is ", github);
core.info("github object is ", github);
const req = {
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
}
// console.log("req is ", req);
core.info("req is ", req);
const { data: pullRequest } = await octokit.rest.pulls.get(
req
)
console.log("pullRequest is ", pullRequest);
core.info("pullRequest is ", pullRequest);

const body = pullRequest.body
// console.log("found body=",body);
core.info("found body=",body);
const regexp = /https:\/\/github.com\/cfengine\/([A-Za-z0-9_.-]*)\/pull\/(\d*)/g
let matches = []
if (body) {
matches = body.matchAll(regexp)
}
for (const match of matches) {
core.setOutput(match[1], 'refs/pull/' + match[2] + '/merge')
console.log(`added ${match[1]} => refs/pull/${match[2]}/merge`);
core.info(`added ${match[1]} => refs/pull/${match[2]}/merge`);
}
core.setOutput(context.payload.repository.name, context.ref);
console.log(`added pull request ref ${context.payload.repository.name} => ${context.ref}`);
core.info(`added pull request ref ${context.payload.repository.name} => ${context.ref}`);
}

run()
1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/resolve

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading