Skip to content
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

Fix message for new GitHub version #6008

Merged
merged 2 commits into from
Jul 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .github/workflows/test_url.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ jobs:
all:
runs-on: ubuntu-latest
steps:
- run: npm install --production @actions/github
- run: |
echo "
const github = require('@actions/github');
- run: npm install --production @actions/github
- run: |
echo "
const github = require('@actions/github');

async function run() {
// Get client and context
const client = new github.GitHub(process.env.GITHUB_TOKEN);
async function run() {
// Get client and context
const client = new github.getOctokit(process.env.GITHUB_TOKEN);

await client.pulls.createReview({
owner: github.context.issue.owner,
repo: github.context.issue.repo,
pull_number: github.context.issue.number,
body: [
\`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`,
\`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`,
].join('\n'),
event: 'COMMENT'
});
}
await client.pulls.createReview({
owner: github.context.issue.owner,
repo: github.context.issue.repo,
pull_number: github.context.issue.number,
body: [
\`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`,
\`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`,
].join('\n'),
event: 'COMMENT'
});
}

run();
" > pr-message.js
- run: node pr-message.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run();
" > pr-message.js
- run: node pr-message.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}