Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active October 10, 2022 11:55
Show Gist options
  • Save cp-sumi-k/7064543ce94a1b10c3397fae93f5ebc8 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/7064543ce94a1b10c3397fae93f5ebc8 to your computer and use it in GitHub Desktop.
// prepare headers
const config = {
headers: {
Accept: "application/vnd.github+json",
Authorization: "Bearer " + PERSONAL_ACCESS_TOKEN(PAT)
}
};
/**
add filter using query params like below ,
https://api.github.com/repos/OWNER/REPO/actions/runs?branch=master
*/
axios.get('https://api.github.com/repos/OWNER/REPO/actions/runs', config)
.then(res => {
// res contains list of workflows
})
.catch(err => {
console.error(err.message)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment